RHEL7: How to get started with network throughput measurement.

Share this link

Presentation

Sometimes, because you need to regularly transfer big files, because you need to download softwares, it can be interesting to measure the network throughput available between two servers.
Several tools exist for this, here we will look at the iperf tool.

Prerequisites

iperf needs to be installed and run on both servers. This can be a limitation in some environments where you only control one side of the communication.

To install the iperf tool, you first need to install the EPEL repository.

Then, you need to type:

# yum install iperf

Test Procedure with iperf

iperf works in a client/server model: one iperf command is run on one server in server mode, one iperf command is launched on another server in client mode.

As previously said, on one server you need to run iperf in server mode:

[server]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------

Note1: The -s option starts the iperf command in server mode.
Note2: Use the -p option to specify an other port than the default 5001 port.
Note3: Use the -u option to use UDP instead of TCP.

As seen above, you will have to temporarily open the 5001 tcp port:

[server]# firewall-cmd --add-port=5001/tcp

On another server, you need to launch iperf in client mode (here IPserver is the IP address of the server):

[client]# iperf -c IPserver
------------------------------------------------------------
Client connecting to IPserver, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local IPclient port 50494 connected with IPserver port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   113 MBytes  94.6 Mbits/sec

Advanced Configuration

To get the best measurements, you need to add the following arguments:

[server]# iperf -l 1M -w 4M -f M -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.41 MByte (WARNING: requested 4.00 MByte)
------------------------------------------------------------

[client]# iperf -l 1M -w 4M -f M -t 60 -c IPserver
------------------------------------------------------------
Client connecting to IPserver, TCP port 5001 TCP window size: 0.41 MByte (WARNING: requested 4.00 MByte) 
------------------------------------------------------------ 
[ 3] local IPclient port 50563 connected with IPserver port 5001 
[ ID] Interval Transfer Bandwidth 
[ 3] 0.0-60.0 sec 674 MBytes 11.2 MBytes/sec

Here are the explanations associated with the different arguments:

  • -l : by default the iperf tool uses a 8KB read/write buffer, -l 1M uses a 1MB buffer that gives more realistic results,
  • -w : by default the iperf tool uses a 85KB TCP window size, -w  4M uses a 4MB TCP window size that gives more realistic results,
  • -f : by default the iperf tool displays results in Mbits/sec, -f M changes that to MBytes/sec,
  • -t : by default the iperf tool uses 10-second duration period, -t 60 changes that to 60-second duration period.

Additional Resources

You can also read this article about the iperf tool.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create an EXT4 file system mounted by UUID in /etc/fstab under /vol based on a logical volume of 28 logical extents.

RHCE7: Task of the day

Allowed time: 15 minutes.
Configure a httpd server with a password protected directory under the /var/www/html/private directory.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...