Subject: Re: TCP socket buffers auto sizing
To: None <tech-net@NetBSD.org>
From: Matthias Scheler <tron@zhadum.org.uk>
List: tech-net
Date: 02/05/2007 19:59:52
On Mon, Feb 05, 2007 at 01:05:10PM -0500, Steven M. Bellovin wrote:
> I was impressed with how much performance different I got with ttcp on
> a GigE LAN just by changing the buffer size.

Yes, almost factor two:

ttcp-t: buflen=32768, nbuf=8192, align=16384/0, port=5001  tcp  -> excalibur
ttcp-t: socket
ttcp-t: connect
ttcp-t: 268435456 bytes in 3.91 real seconds = 67127.17 KB/sec +++
ttcp-t: 8192 I/O calls, msec/call = 0.49, calls/sec = 2097.72
ttcp-t: -1.9user 0.2sys 0:03real 6% 0i+0d 0maxrss 0+80227pf 18791+3csw

ttcp-t: buflen=32768, nbuf=8192, align=16384/0, port=5001, sockbufsize=131072  tcp  -> excalibur
ttcp-t: socket
ttcp-t: sndbuf
ttcp-t: connect
ttcp-t: 268435456 bytes in 2.36 real seconds = 111008.54 KB/sec +++
ttcp-t: 8192 I/O calls, msec/call = 0.30, calls/sec = 3469.02
ttcp-t: -1.9user 0.1sys 0:02real 5% 0i+0d 0maxrss 0+76397pf 16018+1csw

That's NetBSD-i386 3.1 sending to a Mac OS 10.4.8 (which either uses
automatic socket buffer sizing or has a higher default value).

	Kind regards

-- 
Matthias Scheler                                  http://zhadum.org.uk/