Network Bandwidth Performance Measurement with Iperf

January 10th, 2009 Category: Linux

Another easy to use tool for measuring the network bandwidth is Iperf. On Debian it can be installed using:

apt-get install iperf

Optionally the source or the Windows binary is available from sourceforge.net/projects/iperf

Building and installing from source is done using a few commands:

tar xvfz iperf-2.0.4.tar.gz
cd iperf-2.0.4
./configure
make
make install

Once installed iperf the server is started on machine 1:

machine1:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------

Next the client is started on machine 2:

machine2:~# iperf -c machine1.mydomain.de
------------------------------------------------------------
Client connecting to machine1.mydomain.de, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local xx.xx.xx.xx port 45325 connected with yy.yy.yy.yyport 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  96.6 MBytes  80.9 Mbits/sec

Tested on two servers connected with 100 MBit/s located at two different providers in Germany we get a result of 80.9 MBits/sec.

This result is slightly higher compared to the result from our measurement done with NETIO in the article Network Throughput Measurement. So we start the test again with addtional parameters:

machine2:~# iperf -c machine1.mydomain.de -w 512k -l 512k
------------------------------------------------------------
Client connecting to machine1.mydomain.de, TCP port 5001
TCP window size:   256 KByte (WARNING: requested   512 KByte)
------------------------------------------------------------
[  3] local xx.xx.xx.xx port 40987 connected with yy.yy.yy.yyport 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  72.0 MBytes  60.3 Mbits/sec

Now using modified read/write buffer size and TCP windows size we get almost the same result as in our test with netio.

Definitely a tool which can be recommended to check your network throughput!

FTP/SFTP with Resume

January 4th, 2009 Category: General, Linux

File transfers with resume are also possible for secure SFTP connections with WinSCP. A nice free SFTP, FTP and SCP client for Windows. At the WinSCP homepage more information regarding resume can be found.

For secure file transfers SFTP protocol allows resume. WinSCP definitly a nice and free tool!

See also: FTP with resume

winscp.gif

Search and Replace over Multiple Files

December 30th, 2008 Category: Linux

Sometimes you need to search and replace strings over multiple files. This can easily be done using perl. I found this tip from www.liamdelahunty.com/tips

perl -pi -w -e 's/search/replace/g;' *.php
-e means execute the following line of code.
-i means edit in-place
-w write warnings
-p loop