UCL
 

Personal Miscellaneous TCP/IP GRID Quality of Service Multi-Cast

 

lan wan

 

Iperf

Iperf is a program to measure the potential link utilisation of a TCP transfer (also UDP) through a network. It relays on a client (or sender) and a server (reciever).

For a demonstration of the program see the UCL HEP Network Monitoring Site.


Parameter Problems

One 'problem' (bug?) that exists with the current version (1.2) of the program is that it does not seem to set the socket buffer size (window size) of client systems properly.

I conducted a test using the UCL HEP machine (pc35.hep.ucl.ac.uk) and a machine in RAL (dev04.hepgrid.clrc.ac.uk). The RAL machine was set as the server (running as a daemon) with a socket buffer of 256k. The UCL machine was set with various socket buffer sizes and the results monitored with Web100.

The first test consisted of a 10 second iperf transfer using iperf set to 256k.

As you can see the Blue and Green lines represent the socket buffer size at dev04. Whilst the Bornw and Lime lines represent that at pc35. Whilst the settings for dev04 seem to be correct, the local (pc35) machine seems to have it's buffers set to ~64k.

Repeating the test using only 128k on pc35 shows the same results.

Finally, setting the local machine (pc35) to 32k shows that the Web100 software is machine some sense...

See the brown line shift down to ~32k.


Solution

After a little tinkering with the kernel, it was discovered that this problem does not actually reside with iperf, but with the default kernel settings of 2.2.18 (and i assume below). I have no idea about 2.4 kernels - if anyone does, please email me!

The problem can be easily corrected by typing in the following commands as root;

echo 8388608 > /proc/sys/net/core/wmem_max
echo 8388608 > /proc/sys/net/core/rmem_max

which sets the maximum write and read sizes associated with the machine. It is not recommended to change this value on server machines with limited memory.

Retesting with the same conditions shows the following;

with 256k on pc35...

with 128k on pc35,

and finally 32k..


Conclusion

In order to use iperf correctly, one should adjust the kernel read and write memory parameters to a value greater than the socket buffer sizes expected to be used.

 

Wed, 23 July, 2003 13:07 Previous PageNext Page

 
 
    email me!
© 2001-2003, Yee-Ting Li, email: ytl@hep.ucl.ac.uk, Tel: +44 (0) 20 7679 1376, Fax: +44 (0) 20 7679 7145
Room D14, High Energy Particle Physics, Dept. of Physics & Astronomy, UCL, Gower St, London, WC1E 6BT