quic-go / quic-go

A QUIC implementation in pure Go
https://quic-go.net
MIT License
10.1k stars 1.31k forks source link

congestion window value not update correctly #2126

Closed Dispelk9 closed 5 years ago

Dispelk9 commented 5 years ago

Hi, thanks for your quic-go, I have a traffic-generator, which send data from client to server using quic. During the transmission, I want to take the values of the congestion window (currentcongestion window protocol.PacketNumber) using cubic in slow-start, congestion avoidance, etc. But I see that the congestion window value doesn't start at default minimum congestion window value =2 in cubic-sender.go. Is there any other way to get the values of the congestion window at each interval or each step of the congestion control process? Should I get the values in cubic.go or cubic-sender.go?

Thanks for your work and have a nice day.

marten-seemann commented 5 years ago

Why would the congestion window start at the minimum congestion window?

The initial congestion window is defined in https://github.com/lucas-clemente/quic-go/blob/75932b2dcdbd2293a29fcdd091fc5d7000b213f2/internal/protocol/params.go#L16-L17

Dispelk9 commented 5 years ago

thanks for your reply, the cwnd should increase after each RTT, right? so I thought the cwnd at the beginning should equal the minimum cwnd. So you place the initial cwnd equal 32 packets from the first transmission?

marten-seemann commented 5 years ago

Please refer to the specification of the congestion controllers for any questions regarding the basic CC algorithm.