My Network is Slow

9:37 PM

We hear a lot of complaints about network speeds and most of them involve transferring files.
When clients complain about a "slow network" the first thing you need to ask yourself is "are they measuring pure network speed or are they measuring something else?" Nine times out of ten, these complaints usually center around transferring files. When clients mention a file transfer, they are most likely measuring disk read/write speeds and not actual network speeds. This is because rotational media is the slowest part of any computer system.
The first step is to measure pure network speeds, eliminating all other factors. There are several types of tools available for this. To illustrate the testing, we'll use iperf.

Setting up iperf

Download, unpack and build iperf (you need a C++ compiler if you can't find ready-made binaries.) Launch iperf in server-mode on one machine - if you use a high numbered port, you don't need root/administrator privileges. You will need to ensure all firewalls in between the 2 servers allow tcp traffic on the port you choose.
S  ./iperf -s -p 5540
------------------------------------------------------------
Server listening on TCP port 5540
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
Launch iperf in client-mode on the other machine, giving it the IP address and port of the server. By default, iperf will run for 10 seconds but use a longer interval to get a better gauge of throughput.
# ./iperf -p 7768 -c 168.143.87.202 -t 60
------------------------------------------------------------
Client connecting to 168.143.87.202, TCP port 7768
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 10.164.24.14 port 59365 connected with 168.143.87.202 port 7768
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-60.0 sec  2.93 GBytes   419 Mbits/sec
Here's an example of a 60 second run.
$ ./iperf -p 7768 -i 10 -f M -t 60 -c 168.143.87.202
------------------------------------------------------------
Client connecting to 168.143.87.202, TCP port 7768
TCP window size: 0.02 MByte (default)
------------------------------------------------------------
[  3] local 10.164.24.14 port 42727 connected with 168.143.87.202 port 7768
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   589 MBytes  58.9 MBytes/sec
[  3] 10.0-20.0 sec   475 MBytes  47.5 MBytes/sec
[  3] 20.0-30.0 sec   471 MBytes  47.1 MBytes/sec
[  3] 30.0-40.0 sec   429 MBytes  42.9 MBytes/sec
[  3] 40.0-50.0 sec   452 MBytes  45.2 MBytes/sec
[  3] 50.0-60.0 sec   532 MBytes  53.2 MBytes/sec
[  3]  0.0-60.0 sec  2948 MBytes  49.1 MBytes/sec
The extra options used are:
  • "-i 10" - print out a status line every 10 seconds
  • "-f M" - report the bandwidth in MBytes/sec
  • "-t 60" - run the test for 60 seconds
The last line of the output is the overall bandwidth for the test ("0.0-60.0 sec".)

Advanced usage

There are options for adjusting the read and write buffers, TCP window size, max segment size, etc. If you don't know how these properties work in the TCP/IP stack, do not adjust them.

Results

The output of iperf will give you a clearer picture of network speeds since iperf does not read or write to the disk.

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results