You haven't told us the purpose behind the tweak. Do you intend to increase, decrease or clamp the window size? Why?
On linux, setting socket buffers is subject to global net.core.rmem_max and wmem_max sysctl's.
If you do not specify (and therefore lock) the per-socket values via SO_RCVBUF, then linux tcp implementation will dynamically adjust the buffer size within the limits of net.ipv4.tcp_rmem and tcp_wmem. On my system, the tcp_rmem[2] is substantially higher than rmem_max...
The tcp window and buffer allocation should follow the actual need, depending on misc. factors such as memory pressure, link characteristics, remote behavior and so on. Linux kernel is open source. Go on and take a look at net/core/sock.c, net/ipv4/tcp{,_input,_output}.c, etc.
Again, is this to maximize single connection throughput? You could have other issues that prevent full link utilization. Linux supports multiple congestion control algorithms, so that's another thing to play with.
In reply to Re^3: changing tcp parameters when establishing connection
by Anonymous Monk
in thread changing tcp parameters when establishing connection
by iThunder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |