Re: Clarification on behaviour of Iperf's -w option


Hi Jim,

Thanks for the reply.


Jim Ferguson wrote:

Hi Lawrence:

I'll admit the documentation should be more explicit about the -w option for TCP. From the example you use in your mail, note what the tool output when you tried to set the TCP window size:

"TCP window size:   100 KByte (WARNING: requested   100 KByte)"

You *requested* 100 KB, however Iperf cannot override the maximum set by the OS (it is a User level tool), so the message is warning you your command is only a request. Since it is above the OS setting of 64KB, it is unchanged.

If you use -w to set a window size below 64KB, it should work as advertised. Apologies for the inadequacies in the docs as they are.

-Jim Ferguson

In FreeBSD at least, the default maximum size of a socket buffer (send and receive) is 262144 bytes (controlled by the "kern.ipc.maxsockbuf" sysctl variable). 100kb is well under that value, so I don't believe I have asked Iperf to allocate above the OS's maximum buffer size.


I wrote a little patch for Iperf to print the size of both the send and receive buffer when a connection is made to see exactly what effect the "-w" switch has. When I run my patched iperf with the following command "iperf -c 136.186.229.192 -w 100K" it tells me that the size of the receive buffer is 65.0K, and the send buffer is 100K. When I run "iperf -c 136.186.229.192" it tells me that the size of the receive buffer is 65.0K, and the send buffer is 32.5K (recall from my previous email 32k and 64k are the default sizes of FreeBSD TCP socket send and receive buffers respectively). I believe this explains the results I described in my initial email to the list.

It appears the "-w" switch is in fact modifying the size of the send buffer on the client, and is doing so successfully at that.

Setting "-w" to a value below 64k has the same effect, setting the size of the send buffer and leaving the receive buffer at the system default. If I try set "-w" to a value grater than 262144bytes, then it tells me it can't do it and defaults to using the system's default.

Cheers,
Lawrence

http://caia.swin.edu.au/




Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index