I am doing iperf measurements between two servers connected via a 10Gbit link. I am trying to match the maximum window size that I am observing with system configuration parameters.
In particular, I noticed that the maximum window size is 3 megabytes. However, I cannot find the corresponding values ββin the system files.
By running sysctl -a , I get the following values:
net.ipv4.tcp_rmem = 4096 87380 6291456 net.core.rmem_max = 212992
The first value tells us that the maximum recipient window size is 6 MB. However, TCP tends to allocate twice the requested size, so the maximum recipient window size should be 3 MiB, just like I measured it. From man tcp :
Note that TCP actually allocates twice the size of the buffer requested in the setsockopt (2) call, and therefore the subsequent getsockopt (2) call does not return the same buffer size that is requested in the setsockopt (2) call. TCP uses extra space for administrative purposes and internal kernel structures, and the / proc values ββreflect larger sizes than actual TCP windows.
However, the second value of net.core.rmem_max indicates that the maximum recipient window size cannot exceed 208 KiB. And this should be a hard limit, according to man tcp :
tcp_rmem max: maximum receive buffer size used by each TCP socket. This value does not override the global net.core.rmem_max . This is not used to limit the size of the receive buffer declared using SO_RCVBUF on the socket.
So, where do I observe the maximum window size that exceeds the size specified in net.core.rmem_max ?
NB: I also calculated the product Bandwidth-Latency: window_size = Bandwidth x RTT , which is about 3 MiB (10 Gb / s RTT), thus checking traffic capture.