Skip to main content

iPerf testing

Bandwidth testing with iPerf

Updated today

iPerf is a tool for active measurements of bandwidth on IP networks. It supports tuning of various parameters related to timing, protocols, and buffers. For each test, the sensors reports the measured throughput / bitrate, loss, and other parameters.

The UXI sensor currently supports bandwidth measurements using iperf3 and iperf2. iperf3 measures upload and download throughput but is single-threaded and only supports one client connection at a time; you will need multiple instances on different ports to let multiple sensors test at one time. iperf2  is multi-threaded and allows multiple client connections but the sensors only support upload measurements; you will only need one server for multiple sensors (unless you start saturating the available bandwidth of that server).

First, you need to set up your iperf server for the sensors to test against. You can read more about the iperf3 tool (and get your own copy of it) at https://github.com/esnet/iperf.

To set up a new iPerf test on the dashboard, follow the following steps:

  1. Go to Settings -> Services

  2. Click the + Add Service button

  3. You can classify the test as Internal  or External  depending on your preference (e.g. is this an internal or external iPerf server?)

  4. Choose the Custom  template type

  5. Select iPerf3 or iPerf2  from the template dropdown

The options are mostly obvious, but some are covered here:

Direction - Should the sensor upload or download from the iperf3 server

Window  - Set the socket buffer size (for TCP this is the TCP window size)

Port Range Start and Port Range End - This setting is for if you are running multiple iperf servers on different ports of the same server. The sensors will attempt random ports within the specified range. If the iperf server is busy on the port being tried, it will then try another port. This will continue for up to 30 seconds. Ultimately, the sensor should have found a free iperf server by that time. If it does not, then it will report an issue. If you are only running one iperf3 server, set the port range to the same port number. This setting can help reduce potential contention and simplify your test configuration.

Parallel streams  - the number of simultaneous connections to make to the server

Frequency or Rate Limit  - How often the sensors should try to execute this test. Be aware that setting a high frequency as well as a high test duration will cause a lot of data to be sent/received over the day as the sensor performs its tests. These settings are described in more detail here.

Caution

  1. Selecting the Download  and UDP  options with no bandwidth limit can cause the test to report false values. This is because you are instructing the server to send packets to the sensor as fast as possible and UDP doesn't have congestion control. The sensor and dashboard have some workarounds to correct the test results if you do set it up with these options but the results will be approximately 5 - 15% inaccurate.

  2. iperf3 is single threaded and as such only allows one client to connect at a time. This means that if you have multiple sensors all testing against the same iperf3  server with high frequency that you may get some incomplete test results.

Did this answer your question?