TCP Throughput v.s. Parallel Connections

We will study how the number of parallel TCP connections affect overall TCP throughput.


We will use iperf3 for this assignment.

Installing iperf3 should be straight forward. Download iperf3 for the correct platform, and then unzip it to get the iperf3 executable.

Get familiar with iperf3


./iperf3 -h

to see the complete list of options for iperf3. Here, we will just demonstrate a few simple uses.

List of public iperf servers

You can get the list of public iperf3 servers here:

Note, if you get an error saying “iperf3: error - the server is busy running a test. try again later”, then try connecting to the server with a different port (-p [port num]), or try another server. Or, you can also try running your own iperf3 server. Refer to Run iperf server for details.

Connect and transmit to a server
./iperf3 -c -p 5204

The above command connects to the server on port 5204 (-p option) with a single TCP connection, and tests for 10 second transmit from client (your machine) to server. Default connection port is 5201, however, servers may run iperf on different ports. Try another port if you fail to connect.

Specify length of time to transmit
./iperf3 -c -p 5204 -t 5

The above command transmits packets from client to server for 5 seconds (default is 10 seconds).

Run parallel connections to a server
./iperf3 -c -p 5204 -P 5

The above command opens up and transmits with 5 parallel TCP connections to the server (notice the capital -P here).

What to turn in

We want to study how the number of parallel connections affects overall TCP performance. We will plot the total aggregate bandwidth vs. the number of parallel TCP connections. (You can write a shell script to automate the process of trying different number of parallel connections.)


Bash/shell script you use to run the parallel connections. It should at least contain the specific iperf commands you run.


  1. Describe the parameters you use, e.g., length of time to transmit (with -t), number of parallel connections (with -P), and other parameters if you specify any. Note, only the number of parallel connections should vary, and all other parameters should be fixed.

  2. What's the number of parallel connections that give the highest aggregate bandwidth? What's the trend of aggregate bandwidth as the number of parallel connections increases?

  3. Briefly explain the possible reasons behind what you observe. For instance, if aggregate bandwidth increases with more parallel connections at the beginning, then what's the mathematical formula that may explain this? And if aggregate bandwidth stops increasing or even decreases a bit later on, what might be the possible causes?