Measuring network performance

FreeBSD includes several benchmarking suites in the ports collection. One of these suites is netperf, developed by HP. It allows measuring several network parameters using two programs: the server and the client.

First things first: let us install netperf.

% cd /usr/ports/benchmarks/netperf && make install clean

Once the software has been successfully compiled (it does not take long) we can bring the server up:

$ netserver 
Starting netserver at port 12865
Starting netserver at hostname port 12865 and family AF_UNSPEC

Notice that you can launch the server as a regular user. Now, we are ready to run our test:

$ netperf -t TCP_STREAM
TCP STREAM TEST from ( port 0 AF_INET to localhost ( port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

 65536  32768  32768    10.07    3842.31

This test is just a first step as it just shows how your network performs right now. After this, you should tune your system and run the test(s) again to compare the results. A list of tests can be found in the man page.


PS: I’m not an HP employee. XD

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields