[Gllug] socket buffer overrun

Daniel P. Berrange dan at berrange.com
Wed Oct 19 09:28:42 UTC 2005


On Wed, Oct 19, 2005 at 12:05:16AM +0100, Peter Grandi wrote:
> ben_m_f> Should rmem_max be larger? This is on a 1000fdx autoneg
> ben_m_f> interface with txqueuelen:1000.
> 
> Not an optimal level of information, but one of the links below
> says that 'txqueuelen:1000' may be a good idea indeed, among many.
> 
> ben_m_f> [root at myhost root]# cat /proc/sys/net/ipv4/tcp_rmem 
> ben_m_f> 4096    87380   174760
> 
> Raising the 'tcp_rmem' should help, as 1GHz can theoretically do
> more than 100MiB/s (but see the figures in the links below), and
> 0.17MiB of buffering is equivalent to 1.7ms of buffering which
> is not a lot.

The TCP receive/send buffers will auto-tune themselves. Those three
values in tcp_rmem set the mimimum level, the initial and the max
level. All connections start out at the initial level and then auto
tune between the min/max limits. Thus when altering tcp_rmem/tcp_wmem
one should typicall only change the 3 number - the max level. This
allows connections which need it to autotune up to the higher buffer
size, without wasting precious kernel memory on all other TCP connections
on the box.

Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list