Subject: Re: [RFC] tcp: use order-3 pages in tcp_sendmsg()

From: Rick Jones <[email-masked]>
Date: Thu, 20 Sep 2012 15:01:16 -0700

On 09/19/2012 10:37 PM, Eric Dumazet wrote:
> iperf uses 8KB writes, while netperf uses a 16KB default.

For the sake of the archives and posterity, netperf does not have a 
"fixed" default send size.  The "default" will vary with platform and 
platform tuning

What netperf does (for TCP at least) is default the send size to the 
value returned after a getsockopt(SO_SNDBUF) issued against the socket 
just after it is allocated for the data connection.  If the user has 
asked for a specific socket buffer size, there will have been a 
preceding setsockopt(SO_SNDBUF) call.

So, "by default" under Linux, with no options to set the socket buffer 
size, netperf will use 16 KB so long as that is the default (initial) 
value for SO_SNDBUF.

The sequence will go something like:

1) create the data socket
2) if user asked to set socket buffer size call setsockopt()
3) call getsockopt()
4) if the user did not specify a send size, use the value returned from 
the getsockopt() call

So, if one runs netperf on a platform other than Linux, the "default" 
send size may be different.  Similarly, if running under linux, but 
net.ipv4.tcp_wmwm is tweaked, the "default" send size may be different.

happy benchmarking,

rick jones