Testing for Bufferbloat
Dave Täht created a “Realtime Response Under Load (RRUL) Test” specification and he describes it in the following way: “The Realtime Response Under Load (RRUL) test puts a network under worst case conditions, and then measures for fairness, latency, realtime responsiveness, classification based optimization (and preservation), and the relative performance of TCP and UDP streams of varying rates, while under that load. Most importantly, it tests for web page load time performance while under these loads.”
Toke Høiland-Jørgensen decided that it would be a good idea to produce a wrapper for Netperf to implement the test cases that Dave put together. Here is a short description to get the netperf-wrapper working.
First, you might want to check whether you have netperf running on your system already (and which version):
# netperf -V
You have to retrieve Netperf version 2.6. When I tried it the netperf-wrapper did not work with earlier versions.
# svn co http://www.netperf.org/svn/netperf2/tags/netperf-2.6.0
Then, switch to the netperf directory and compile it with
# ./configure --prefix=/usr/ --enable-demo=yes
On Ubuntu I had to use the –enable-demo=yes switch since otherwise netperf wouldn’t work with the wrapper. I also got an error message.
# make check
# make install
On one of my Linux machines I had problems doing the make and it turned out executing ./autogen.sh helped to clean up the directory.
Now, netperf -V should then indicate the correctly installed version.
Netperf requires a client installation and a server installation. Hence, you may have to repeat the steps shown above on your second machine. Here for demonstration purposes I run the client and the server on the same machine. This is, of course, not very useful from a bufferbloat point of view.
Btw, I am looking for someone who has a netperf server running on the Internet so I can test my home network. I have a very basic hosting account at the moment, which does not give me ssh access.
Anyway, start the netperf server with:
You can check the working installation with an example:
# netperf -P 0 -v 0 -D -0.2 -4 -H localhost -t UDP_RR -l 70
Then, obtain the netpef-wrapper:
# git clone git://github.com/tohojo/netperf-wrapper.git
The wrapper needs a Python graphical library (in case you haven’t installed already):
# apt-get install python-matplotlib
Then, it is time to run the netperf-wrapper by executing the netperf-wrapper file after you switched to the netperf-wrapper directory. You can also install the python files, if you like, with
# sudo python2 setup.py install
Finally, it is time to actually run the netperf-wrapper. In my test example the client and the server are on the same machine. You need to decide where the output of the test should go. It can be either displayed on the screen or dumped into a file. The first example shows the output to the screen:
# ./netperf-wrapper -H localhost -p ping_cdf rrul
Next, we dump the output into a file:
# ./netperf-wrapper -H localhost -p ping_cdf -o rrul-test-file.ps -f plot rrul
(The “-o” flag indicates that you want to produce a file output. If you don’t like Postscript then replace the suffix of the output file, for example to rrul-test-file.pdf)
The -p ping_cdf rrul parameter means the following:
* rrul is the name of test that is executed; there are further tests in the tests directory.
You can also enter the following command to see all the available tests:
# ./netperf-wrapper --list-tests
Here is the list of tests you should see with the fresh installation:
* ping_cdf is the type of plot that is generated. Each test file also has information about the tests that are produced. If you look at the rrul.conf then you will find a number of different options for the plots under the PLOTS section. Alternatively, you can also run the following command to see the available plots for a given test.
# ./netperf-wrapper --list-plots <test_name>
For example, here is the list of plots:
An example output of a test may look like this:
If you would like to perform a different analysis you can either switch to a different test, you could look for different plots, you could also add new test cases yourself. Finally, you can also use a statistic system like R to analyze the data yourself. This is fairly easy since the netperf-wrapper creates a JSON output of the test runs.
In any case double-check the results you had gotten because the graphics produce by the netperf-wrapper sometimes are a bit messed up. I suspect that there are some bugs in there.