[4176] in linux-net channel archive
Re: TCP/buffering changes
daemon@ATHENA.MIT.EDU (Linus Torvalds)
Sat Aug 24 04:16:25 1996
Date: Sat, 24 Aug 1996 10:05:47 +0300 (EET DST)
From: Linus Torvalds <torvalds@cs.helsinki.fi>
To: Darren Crane <dcrane@ivs.piedmont.net>
cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.rutgers.edu,
linux-net@vger.rutgers.edu
In-Reply-To: <Pine.LNX.3.95.960823135907.247A-100000@ivs.piedmont.net>
On Fri, 23 Aug 1996, Darren Crane wrote:
>
> Something between 2.0.10 and 2.0.11 slowed samba down.
>
> I'm running samba with the following socket options...
> read prediction = True
> read size = 4096
> socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096
> SO_RCVBUF=32768
You _definitely_ want SNDBUF to be a lot more than 4096. The _minimum_
value that makes sense is somewhere around 32kB (the default is 64kB).
> Why a SO_SNDBUF of 4k? 90% of trafic is from our home grown dos app
> which reads files in 4K chunks. Why? Cause Dos sucks.
Note that a SO_SNDBUF of 4096 means that Linux can't even send a single
4kB TCP stream without having to wait for more memory, because the
headers of the packets take up space too..
> But the slowdown
> I experience happens with regular dos copy commands as well, and it still
> exists if I up the SO_SNDBUF to 32768 (or anything between the two).
Ok, 2.0.11 did change the way we sleep on write buffer full conditions,
so there is _something_ in the buffering. But please make sure that you
don't have a SNDBUF of 4096 (did you re-start samba completely after
changing the SNDBUF stuff?)
Linus