Measuring the bandwidth of a network between servers


Today we offer two methods of measuring network bandwidth between servers. Ideally, what is needed is a method of testing network bandwidth while avoiding any server bottlenecks that could be induced by the IO subsystem in each server. Network measurement tools exist, such as iperf, iperf2, and netperf, that do a good job with proper settings. One example today relies on using a simple ftp client and server found on most Windows/Unix/Linux servers without installing additional packages. Our final example uses iperf and requires installing iperf on source and target servers.

Using an ftp client and server for network testing

We bypass any bottleneck issues with the IO subsystems on both the source and target server by using /dev/zero as the data source and /dev/null as the data target. The value returned by the ftp client after the data transfer is the network bandwidth between source and target servers for a single connection, TCP/IP, data stream.

Using multiple concurrent data streams for network testing

Multiple concurrent TCP/IP data streams can be used between source and target servers to “sometimes” increase network bandwidth between servers. Ftp servers (data target) support multiple TCP/IP streams from one or more ftp clients (data source). However, not all ftp clients have the ability to support multiple TCP/IP streams without executing multiple ftp client instances on each data source server. At the time of this writing, the ftp clients Cute-ftp and FtpPro are known to support multiple TCP/IP streams to an ftp server for a single file transfer. Optionally,  iperf, iperf2 and netperf with proper settings can deliver multiple TCP/IP streams between source and target servers to measure the saturated network bandwidth available between servers.

Testing Instructions for FTP Client

The following instructions demonstrates how to send data from /dev/zero on a source server to /dev/null on a target server using an Ftp client and server to avoid IO subsystem overhead :

1. From the source server, execute the ftp client and connect to the target ftp server

ftp [IP address | host name of data target server]

2. Send data from data source to data target server. Note – A block size of 1024 (bs=1024) should be used for 1 Gb networks while a bs=9000 should be used for 10 Gb networks.

put “|dd if=/dev/zero bs=9000 count=100000″ /dev/null

3. Record the network speed after the transfer finishes or within a monitoring tool such as nmon, or top

nmon

Installing iPerf on RHEL or CentOS

The following instructions demonstrates how to install iPerf on a source or target server:

1. On the target server (mn01), execute the following yum command as root

# yum install iperf

2. On the source server (mn02), execute the following yum command as root

# yum install iperf

Testing Instructions for iPerf

The following instructions demonstrates how to send data using iPerf on a source server to iPerf on a target server:

1. On the target server (mn01), execute the iPerf server

# iperf -s

2. On the source server (mn02), execute the iPerf client

# iperf -c mn01 -l 64k -P 40 -i 3 -t 30

3. Record the network speed after the transfer finishes by reviewing the [SUM} or within a monitoring tool such as nmon, or top

# nmon

 

 

Leave a comment