View previous topic :: View next topic |
Author |
Message |
transpetaflops Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 May 2005 Posts: 159
|
Posted: Thu Nov 16, 2006 11:13 pm Post subject: Automatic TCP send socket buffer sizing |
|
|
A patch was just released to FreeBSD that dynamically adjusts the TCP send socket buffer size to optimize bandwidth utilization under various conditions:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=244836+0+current/freebsd-net
Does anyone know if something similar already exists in Gentoo or if there is work in progress? How would I go about to interest a developer in this idea?
Regards
PP |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JRV Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jan 2004 Posts: 291
|
Posted: Fri Nov 17, 2006 9:42 am Post subject: Re: Automatic TCP send socket buffer sizing |
|
|
Hi,
since this is a kernel issue, it's not specific to Gentoo. According to this URL, dynamic buffer sizes have been in the Linux kernel since 2001:
http://www.csm.ornl.gov/~dunigan/netperf/auto.html
Quote: | Linux 2.4 auto-tuning/caching
In 2001, the Linux 2.4 kernel included TCP buffer tuning algorithms. For applications that have not explicitly set the TCP send and receive buffer sizes, the kernel will attempt to grow the window sizes to match the available bandwidth (up to the receiver's default window). Like the Mathis work described above, if there is high demand for kernel/network memory, buffer size may be limited or even shrink. Autotuning is controlled by new kernel variables net.ipv4.tcp_rmem/wmem and the amount of kernel memory available. (See Linux 2.4 sysctl variables.) Autotuning is disabled if the application does its own setsockopt() for TCP's SND/RCVBUF. Linux 2.4 doubles the requested buffer value in the setsockopt(). So if a receiver requests a 2MByte receive buffer, the kernel will advertise 3143552. Similarly, if a 128KByte send buffer is requested, cwnd can grow to 215752. |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
transpetaflops Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 May 2005 Posts: 159
|
Posted: Fri Nov 17, 2006 9:57 am Post subject: |
|
|
Very good info. Thankyou for pointing me in the right direction.
Regards
PP |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
blood2rayne n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Nov 2006 Posts: 2
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|