1 of 13

Iperf3

Seth Elliott

SC10

November 18th, 2010

2 of 13

What is Iperf3?

  • Iperf3 is a new implementation of iperf from scratch
    • Goal: smaller, simpler code base
    • Includes a library version of the functionality
    • Not backwards compatible with iperf2.x

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

3 of 13

Iperf2 features currently supported by Iperf3

  • TCP and UDP tests
  • Set port (-p)
  • Setting TCP options: No delay, MSS, etc.
  • Setting UDP bandwidth (-b)
  • Setting socket buffer size (-w)
  • Reporting intervals (-i)
  • Setting the iperf buffer (-l)
  • Bind to specific interfaces (-B)
  • IPv6 tests (-6)
  • Number of bytes to transmit (-n)
  • Length of test (-t)
  • Parallel streams (-P)
  • Setting DSCP/TOS bit vectors (-S)
  • Change number output format (-f)

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

4 of 13

Iperf2 features Iperf3 plans to support

  • General
    • Threading
  • Server
    • Daemon mode
  • Client
    • Set Linux congestion algorithm
    • Multicasting and setting TTL

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

5 of 13

Iperf2 features not supported by Iperf3

  • General
    • Reporting style and exclude
    • Compatibility mode
  • Client
    • Bidirectional testing
    • Data transmitted from a file or stdin

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

6 of 13

New features in Iperf3

  • Dynamic server (client/server parameter exchange)
    • Most server options from iperf2 can now be dynamically set by the client
  • Client/server results exchange
  • Reverse test mode
    • Server sends, client receives
  • Iperf API (libiperf)
    • Provides an easy way to use, customize and extend iperf functionality
    • Consolidated error handling

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

7 of 13

The Iperf API: Overview

  • The iperf_test structure
    • The Iperf API is controlled by a structure called iperf_test
    • This structure holds all settings and data associated with an Iperf test
  • Basic Iperf API functions
    • iperf_new_test()
      • Allocate a new test structure
    • iperf_defaults(struct iperf_test *)
      • Set iperf_test structure defaults
    • iperf_run_client(struct iperf_test *)
      • Runs an Iperf client with the settings specified in the iperf_test structure
    • iperf_run_server(struct iperf_test *)
      • Runs an Iperf server with the settings specified in the iperf_test structure
    • iperf_free_test(struct iperf_test *)
      • Free the iperf_test structure

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

8 of 13

The Iperf API: Usage

There are four steps to using the Iperf API

 

    • First, allocate and initialize your iperf_test structure
    • Second, call iperf_run_client (and iperf_run_server if needed)
    • Third, check for errors in iperf_run_client or iperf_run_server
    • Fourth, you're done! You may now do reporting on your iperf_test structure

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

9 of 13

The Iperf API: Customization

  • The Iperf functionality can be easily customized through callback functions
  • State callbacks
    • on_connect, on_new_stream, on_test_start, on_test_finish
    • These callbacks are assigned to functions that manage iperf output by default
  • Periodic callbacks
    • stats_callback, reporter_callback
    • Compute and display interval/summary reports by default

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

10 of 13

The Iperf API: Extensibility

  • The Iperf API provides a way to add new features to the traditional Iperf functionality
    • Add protocols
    • Collect additional data
    • More extensive reporting

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

11 of 13

Iperf3 Performance

From

To

Ping

Iperf2 Transfer

Iperf3 Transfer

Transfer

Iperf2 Bandwidth

Iperf3 Bandwidth

Bandwidth

% Difference

Brookhaven

Boston

6.916 ms

57.8 Gbytes

59.63 Gbytes

1.83 Gbytes

8.27 Gbits/sec

8.54 Gbits/sec

0.27 Gbits/sec

3.26%

Boston

Brookhaven

6.917 ms

57.07 Gbytes

58.9 Gbytes

1.83 Gbytes

8.16 Gbits/sec

8.43 Gbits/sec

0.27 Gbits/sec

3.31%

Boise

Boston

64.023 ms

42.93 Gbytes

43.0 Gbytes

0.07 Gbytes

6.15 Gbits/sec

6.16 Gbits/sec

0.01 Gbits/sec

0.16%

Boston

Boise

64.022 ms

43.2 Gbytes

43.3 Gbytes

0.1 Gbytes

6.19 Gbits/sec

6.20 Gbits/sec

0.01 Gbits/sec

0.16%

Boise

Brookhaven

70.877 ms

39.3 Gbytes

39.3 Gbytes

0.0 Gbytes

5.62 Gbits/sec

5.62 Gbits/sec

0.0 Gbits/sec

0.0%

Brookhaven

Boise

70.908 ms

39.2 Gbytes

39.2 Gbytes

0.0 Gbytes

5.62 Gbits/sec

5.62 Gbits/sec

0.0 Gbits/sec

0.0%

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

12 of 13

What's next for Iperf3?

  • More API development and refinement
    • Add ability to extend parameter and results exchange
    • More sanity checks
    • Even better error handling
  • Iperf for Python
  • BWCTL integration
  • Multicast support

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science

13 of 13

Questions?

Lawrence Berkeley National Laboratory

U.S. Department of Energy | Office of Science