Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automatic TCP send socket buffer sizing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
transpetaflops
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 159

PostPosted: Thu Nov 16, 2006 11:13 pm    Post subject: Automatic TCP send socket buffer sizing Reply with quote

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
View user's profile Send private message
JRV
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 291

PostPosted: Fri Nov 17, 2006 9:42 am    Post subject: Re: Automatic TCP send socket buffer sizing Reply with quote

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
View user's profile Send private message
transpetaflops
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 159

PostPosted: Fri Nov 17, 2006 9:57 am    Post subject: Reply with quote

Very good info. :D Thankyou for pointing me in the right direction.

Regards
PP
Back to top
View user's profile Send private message
blood2rayne
n00b
n00b


Joined: 15 Nov 2006
Posts: 2

PostPosted: Fri Nov 17, 2006 11:04 am    Post subject: Reply with quote

good info
_________________
www.citychasers.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum