…Finally, we’ll take a look at nuttcp, which includes many options for tweaking buffer lengths, nodelay options, and type of service fields to see what impact this has on your network performance. nuttcp can show either overall bandwidth or the bandwidth achieved in the last second.
nuttcp is available in the Fedora 9 repositories but not for openSUSE or Ubuntu. Build and installation is shown below:
tar xjvf nuttcp-5.5.5.tar.bz2 cd ./nuttcp* cc -O3 -o nuttcp nuttcp-5.5.5.c strip nuttcp sudo install -m 555 nuttcp /usr/local/bin/
Start the server using nuttcp -S. The client can be invoked with many options, followed by the server host name(s) at the end of the command line. The below test prints the bandwidth every second (specified by the -i1 option) while the test is running and runs for 10 seconds before completing.
$ nuttcp -v -v -i1 192.168.10.210 nuttcp-t: v5.5.5: socket nuttcp-t: buflen=65536, nstream=1, port=5001 tcp -> 192.168.10.210 nuttcp-t: time limit = 10.00 seconds nuttcp-t: connect to 192.168.10.210 with mss=1448 nuttcp-t: send window size = 8192, receive window size = 43690 nuttcp-r: v5.5.5: socket nuttcp-r: buflen=65536, nstream=1, port=5001 tcp nuttcp-r: interval reporting every 1.00 second nuttcp-r: accept from 192.168.0.200 nuttcp-r: send window size = 8192, receive window size = 43690 85.3719 MB / 1.00 sec = 715.9765 Mbps 86.3684 MB / 1.00 sec = 724.5411 Mbps 85.9188 MB / 1.00 sec = 720.7551 Mbps 84.4201 MB / 1.00 sec = 708.2533 Mbps 87.7772 MB / 1.00 sec = 736.2222 Mbps 86.7372 MB / 1.00 sec = 727.5696 Mbps 91.4327 MB / 1.00 sec = 767.0191 Mbps 89.4166 MB / 1.00 sec = 750.2228 Mbps 85.4859 MB / 1.00 sec = 717.0937 Mbps 87.0377 MB / 1.00 sec = 729.9696 Mbps nuttcp-t: 870.1633 MB in 10.00 real seconds = 89091.75 KB/sec = 729.8396 Mbps nuttcp-t: 13923 I/O calls, msec/call = 0.74, calls/sec = 1392.10 nuttcp-t: 0.0user 22.3sys 0:10real 224% 0i+0d 0maxrss 0+3pf 16198+1383csw nuttcp-r: 870.1633 MB in 10.00 real seconds = 89083.52 KB/sec = 729.7722 Mbps nuttcp-r: 55254 I/O calls, msec/call = 0.19, calls/sec = 5524.09 nuttcp-r: 0.0user 6.7sys 0:10real 67% 0i+0d 0maxrss 0+20pf 62619+635csw
You can also run multiple streams at once; use -N3 to start three connections, for example. The -B option makes the client receive traffic only, while the -D option transmits only. The default is for communication in both directions.
$ nuttcp -v -v -N3 -B 192.168.10.210 nuttcp-t: v5.5.5: socket nuttcp-t: buflen=65536, nstream=3, port=5001 tcp -> 192.168.10.210 nuttcp-t: time limit = 10.00 seconds nuttcp-t: connect to 192.168.10.210 with mss=1448 nuttcp-t: send window size = 8192, receive window size = 43690 nuttcp-t: 1239.8698 MB in 10.00 real seconds = 126944.75 KB/sec = 1039.9314 Mbps nuttcp-t: 19838 I/O calls, msec/call = 0.52, calls/sec = 1983.52 nuttcp-t: 0.0user 41.2sys 0:10real 413% 0i+0d 0maxrss 0+3pf 4758+3081csw nuttcp-r: v5.5.5: socket nuttcp-r: buflen=65536, nstream=3, port=5001 tcp nuttcp-r: accept from 192.168.0.200 nuttcp-r: send window size = 8192, receive window size = 43690 nuttcp-r: 1239.8698 MB in 10.00 real seconds = 126934.93 KB/sec = 1039.8509 Mbps nuttcp-r: 29899 I/O calls, msec/call = 0.34, calls/sec = 2989.25 nuttcp-r: 0.0user 8.5sys 0:10real 86% 0i+0d 0maxrss 0+18pf 12519+1847csw $ nuttcp -v -v -N3 -D 192.168.10.210 ... nuttcp-r: v5.5.5: socket nuttcp-r: buflen=65536, nstream=3, port=5001 tcp nuttcp-r: accept from 192.168.0.200 nuttcp-r: send window size = 8192, receive window size = 43690 nuttcp-r: 806.2317 MB in 10.00 real seconds = 82545.65 KB/sec = 676.2140 Mbps nuttcp-r: 67104 I/O calls, msec/call = 0.15, calls/sec = 6709.39 nuttcp-r: 0.0user 5.7sys 0:10real 57% 0i+0d 0maxrss 0+18pf 73018+378csw
nuttcp provides similar options to nepim and is heavily focused on measuring the network bandwidth between hosts. Using -i1 with nuttcp, and by default with nepim, you see the bandwidth statistics printed every second while the test is taking place. The nuttcp man page shows many options for the type of service and buffer sizes that you can explicitly set when running nuttcp so you can see if your particular hardware and drivers do not perform well in certain configurations. Running nepim —help will show many more options for configuring the buffers, window sizes, and TCP options.
It is a matter of personal convenience whether you should use nuttcp or nepim. Since nepim is packaged for openSUSE and nuttcp is packaged for Fedora, it might boil down to what distribution you are running as to which of these two tools to use.
Both nepim and nuttcp provide options for setting the size of network packet queues and other more advanced options, such as the TCP maximum segment size, in order to improve the network performance by changing the software setup at each end. Meanwhile, the LMbench tests are quick to run and provide useful insight into your available bandwidth and latencies on your network link.
Read in the original layout at: http://www.linux.com/archive/feature/144532