IBM Support

IBM AIX: Performance Analysis Using iPerf

How To


Summary

iPerf is a widely used command-line tool designed for measuring network performance by generating TCP and UDP traffic between two endpoints. It allows network administrators, engineers, and individuals involved in network troubleshooting and performance tuning to assess network throughput, latency, packet loss, and other metrics.

Objective

Describe the steps to:
  1. Download iPerf
  2. Install iPerf
  3. Run iperf as server and client
  4. Where to look to determine throughput

Environment

Any platform where iPerf is installed or an executable is available, except some things here are AIX-specific.

Steps

Performance Analysis Using iPerf.
iPerf is an open source tool for testing network throughput. iPerf is a widely used command-line tool for measuring network performance by generating TCP and UDP traffic between two endpoints. It helps assess network throughput, packet loss, latency, and other metrics. It is useful for network administrators, engineers, and anyone involved in network troubleshooting, performance tuning, or capacity planning.

---------------------------------------------------------------------------------
Installing iperf:

-Download latest iPerf level from
https://www.ibm.com/support/pages/aix-toolbox-open-source-software-downloads-alpha
- Copy iperf3-nnn.nnn.ppc.rpm in /tmp dir
- Run "rpm -Uvh /tmp/iperf3-nnn.nnn.ppc.rpm"
- The rpm command creates /usr/bin/iperf

** See the AIX Toolbox Tips section for more information


After installing iperf, run it as follows:
The following steps send data from host B to host A.
(1) On host A (run iperf as server)
 iperf -s -w 512k

(2) On host B (run iperf as client)
 iperf -c <ipaddress of host A> -P 24 -t 180 -l 64k -w 512k


Note: run "iperf -h" to get details about the flags.  The values mentioned earlier are a good place to start.
We used multiple parallel client-threads earlier to ensure that the link is saturated and run for 180 seconds with the flags used earlier.

Examine the output and note that the number that indicates total throughput in the output is the one on the SUM line.  You might want to run the commands mentioned earlier within a script command to capture the displayed output to a file, and you might want to test in both directions.  In that case change which host your run the client command on, and which host the server.

Note that iperf provides a wide range of options and settings that allow you to customize the test parameters, such as the test duration, port number, TCP/UDP mode, and more. You can refer to the iPerf documentation or use the iperf --help command to explore the available options.
 
---------------------------------------------------------------------------------

A man-page for iperf can be found readily online. Here is the usage output from the iperf command:
Usage: iperf [-s|-c host] [options]
       iperf [-h|--help] [-v|--version]
Client/server:
  -f, --format    [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes
  -i, --interval  #        seconds between periodic bandwidth reports
  -l, --len       #[KM]    length of buffer to read or write (default 8 KB)
  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)
  -o, --output    <filename> output the report or error message to this specified file
  -p, --port      #        server port to listen on/connect to
  -u, --udp                use UDP rather than TCP
  -w, --window    #[KM]    TCP window size (socket buffer size)
  -B, --bind      <host>   bind to <host>, an interface or multicast address
  -C, --compatibility      for use with older versions does not sent extra msgs
  -M, --mss       #        set TCP maximum segment size (MTU - 40 bytes)
  -N, --nodelay            set TCP no delay, disabling Nagle's Algorithm
  -V, --IPv6Version        Set the domain to IPv6
Server specific:
  -s, --server             run in server mode
  -U, --single_udp         run in single threaded UDP mode
  -D, --daemon             run the server as a daemon
Client specific:
  -b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec
                           (default 1 Mbit/sec, implies -u)
  -c, --client    <host>   run in client mode, connecting to <host>
  -d, --dualtest           Do a bidirectional test simultaneously
  -n, --num       #[KM]    number of bytes to transmit (instead of -t)
  -r, --tradeoff           Do a bidirectional test individually
  -t, --time      #        time in seconds to transmit for (default 10 secs)
  -F, --fileinput <name>   input the data to be transmitted from a file
  -I, --stdin              input the data to be transmitted from stdin
  -L, --listenport #       port to receive bidirectional tests back on
  -P, --parallel  #        number of parallel client threads to run
  -T, --ttl       #        time-to-live, for multicast (default 1)
  -Z, --linux-congestion <algo>  set TCP congestion control algorithm (Linux only)
Miscellaneous:
  -x, --reportexclude [CDMSV]   exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
  -y, --reportstyle C      report as a Comma-Separated Values
  -h, --help               print this message and quit
  -v, --version            print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
Example iperf output:
------------------------------------------------------------
Client connecting to 192.168.1.100, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.101 port 54536 connected with 192.168.1.100 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.07 GBytes   917 Mbits/sec

Analysis:

  • The client is connecting to the server with IP address 192.168.1.100 and using TCP port 5001.
  • The TCP window size is set to the default value of 85.0 KByte.
  • The connection is established between the client (192.168.1.101) and the server (192.168.1.100) on port 5001.
  • The test ran for a duration of 10 seconds (0.0-10.0 sec).
  • During the test, 1.07 gigabytes of data were transferred.
  • The measured bandwidth is 917 megabits per second (Mbps).

Based on this example, the analysis can be as follows:

  • The bandwidth of 917 Mbps indicates the network's capacity to transmit data. Higher values generally indicate better performance.
  • The TCP window size of 85.0 KByte might impact the maximum achievable bandwidth. Increasing the TCP window size could potentially improve performance in certain scenarios.
  • The test ran for 10 seconds, providing a decent time window for measuring network performance.
  • No packet loss or latency values are presented in this particular output, but those metrics are crucial for assessing network quality.

To conduct a more comprehensive analysis, additional information such as latency, jitter, and packet loss is necessary. These values, along with benchmark comparisons and consideration of the network environment, provide a more complete understanding of the network's performance characteristics.

AIX Toolbox for Open Source Software Tips
Download :
The AIX Toolbox team recommends using DNF to install and manage Open Source software packages and dependencies
Visit Get Started to learn more about DNF and the dnf_aixtoolbox.sh installation script.
Read What's New in the AIX Toolbox for Open Source Software
Get Help for AIX Toolbox for Open Source Software            



Additional Information

SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For more information, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For more information, see: Working with IBM AIX Support: Collecting snap data


Click here to submit feedback for this document.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

More support for:
AIX

Software version:
All Versions

Operating system(s):
AIX

Document number:
886387

Modified date:
14 December 2023

UID

ibm10886387

Manage My Notification Subscriptions