disabling linux tcp receiver window auto tuning

11,937

Turn off auto-tuning of the TCP receive buffer size. On the receiver:

$ sudo sysctl net.ipv4.tcp_moderate_rcvbuf=0

Or

$ sudo echo 0 > /proc/sys/net/ipv4/tcp_moderate_rcvbuf
Share:
11,937
HorusH
Author by

HorusH

PostDoc

Updated on July 25, 2022

Comments

  • HorusH
    HorusH almost 2 years

    I'm working on linux (2.6.43.8-1.fc15.i686.PAE) and face some problem to disable auto tuning of the TCP receiver window.

    I'm trying to find a given setting that would force my client to advertise a fixed receiver window. I tried to give a same given value to net.core.rmem_max (/proc/sys/net/core/rmem_max) and net.core.rmem_default (/proc/sys/net/core/rmem_default) as well as ipv4.tcp_rmem (net.ipv4.tcp_rmem) but when checking the advertised window (using wireshark) it's absolutely not changing anything....

    This is for a study of TCP behavior and I would be very greatful if someone could answer me

    Thanks in advance

    PS: I made use of this post to tune the parameters