0

currently I am doing some Measurements (using iperf3, TCP-Tracepoints (for monitoring the Congestion-Window (CWND)) and tcpdump). While altering the TCP-Window (RWND) Field (using a nf-hook kernel Module), I noticed a mismatch between the congestion-window-value and the receive-window-value. See Graph of CWND and RWND

(Here you can clearly see that the CWND is capped by the RWND but that the values are not in the correct units / values)

[Server] -- Data --> [Client] [Server] <-- Acks -- [Client] (Server keeps a Congestion Window (via the Cubic algorithm)) (Client includes the manually controlled receive-window in the ACKs (using the 'Window'-Field in the TCP-Header)) (The Receive-Window is set to increase every 5 seconds (as seen in the Graph above)) 

The Graph is from the Server-Side and displays the CWND (Red) (Seen via the tcp_probe tracepoint) and the RWND (Blue) (Seen via the incomming ACKs in Wireshark). The RWND is converted to MSS Units by using the tcp.window_size (this value is already scaled by the scale-factor) (Image of RWND in Wireshark) and dividing it by the MSS of the stream (1460 Bytes for both sides in this measurement) (See Wireshark Capture of MSS).

This results in a simple Formula of tcp.window_size / MSS

My understanding is that that should bring both values to the same Unit and that the CWND in the Graph should now be capped by the RWND but this isn't the case (Because in the Graph the CWND is bigger than the RWND)

Does anyone have any Idea why this is? Am I doing any calculations wrong or do I have some units mixed up?

Any Help would be greatly appreciated :D

1 Answer 1

0

The congestion window and the receive window are different things.

The receive window is sized as signaled by the receiver. Its aim is to prevent overloading the receiver.

The congestion window is controlled by congestion detection. Its aim is to prevent overloading the intermediate network. Its basic mechanism is increase slowly, decrease sharply or additive increase/multiplicative decrease (AIMD). How exactly it works depends on the TCP algorithm in use.

See https://en.wikipedia.org/wiki/TCP_congestion_control#Congestion_window for a more detailed overview.

3
  • But shouldn't the cwnd be limited by the rwnd? In the first Graph you can even see that the cwnd is limited by the rwnd in some way. I am just not quite sure how exactly... Commented May 25, 2024 at 8:56
  • The effective window is limited by both congestion and receive window. As I wrote, the latter two are different things. Commented May 25, 2024 at 9:18
  • Ahh ok, I always thought the cwnd was limited by the rwnd (like cwnd = max(cwnd, rwnd)) but it is not the cwnd that is limited but the bytes that can be in flight simultaneously. Is that about right? Commented May 25, 2024 at 12:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.