-
Notifications
You must be signed in to change notification settings - Fork 2
IperfOnPlanetLab
In this tutorial we show how to use Iperf on a Planet Lab slice to measure the average bandwidth between the nodes of the slice.
On each node we need Iperf statically compiled and disabling threads ( to avoid a bug in Iperf that does not properly kills the thread when a connection closes). To do this do the following operations:
./configure LDFLAGS=-static --disable-threads && make
Please note that planet-lab hosts are 32bit machines. If you compile with a 64bit toolchain the binary will not be executable on planet-lab. To make sure your binary is 32bit check with the ```file``` command.
saverio@aquila ~/public_html/planet-lab $ file iperf
iperf: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.9, not stripped
saverio@aquila ~/public_html/planet-lab $
Now that we have Iperf statically compiled, load it on each node of the slice with the command :
./multiquery 'wget url-of_iperf'
Example:
./multiquery 'wget -q http://160.80.81.106/~saverio/planet-lab/iperf && chmod +x ~/iperf && echo DONE'
Let's start Iperf as a server on each node with:
./multiquery './iperf -s'
You can also specify the port where Iperf server listen adding the option -p <port></port>
./multiquery './iperf -s -p <port> -D && echo IPERFOK'
Now on our Pc we need a script that select randomly two node (the first will be the client ,the second will be the server) and starts Iperf from the client node to the server node and sends 1Mbyte collecting the results on a file. After 60 seconds the script restart
See : source:/planet-lab/iperf-plan.py
Instead of sending 1Mbyte every 60 seconds we can send a random number of Mbyte (generated by a pareto distribution) and restart the script after a random number of seconds. See : source:/planet-lab/iperf-plan-pareto.py
Remember you need the nodes.txt file in the same directory where you are executing the python script
To collect the results we can use the command ```./multicopy``` that copies the files from the remote machines to their corresponding local directories on our Pc.
./multicopy '@:path_to_file' /path_to_local_directory/@
Now in '/path_to_local_directory/' we have the desired files.
Example: copy all the txt files from the remote home folder to the current directory
multicopy '@:./*.txt' @
To calculate the average bitrate we use another python script that gets the bitrate of each transmission with Iperf between nodes and calculate the average bitrate.
You can see : source:/planet-lab/misurabit.py