The Question• If multiple TCP connections are opened in parallel,
will the total throughput improve?
>?
Relevance• Aggressiveness of TCP connections
• Would be unfair if opening more connections resulted in greater throughput
• TCP is a dominant transport protocol in the Internet
• Bandwidth restrictions on a single connection
• Download accelerators
Background• “Fair share” in TCP congestion avoidance
• From the slides we have discussed TCP friendliness[1]:• Competition with other TCP flows• Competition with other non-TCP flows
[1]: Chapter 16 Slides
Background• Shorter RTTs obtain a larger share of bandwidth than
those having larger RTTs[1]
• Combats aggressiveness with additive increase and multiplicative decrease[1]
• [1]: Chapter 16 Slides
Hypothesis
1. Increasing the number of TCP connections between two machines will not increase the total throughput.
• Assumptions:• No limit on throughput per connection• Sufficient memory to sustain the connections and their buffers
2. If the window size is set to an unreasonable value, the resulting negative impact on throughput will remain the same as the number of connections increases
.
Requirements for Evaluation• We need a way to accomplish each of the following:
1. Open multiple TCP connections in parallel
2. Adjust TCP window sizes
3. Measure the rate of speed for each connection
4. Ideally plot graphs for each of the experiments
Potential Tools• Program our own diagnostic tool• Use some other existing network diagnostic tool• Use Wireshark to measure and graph connections• Use a different visualization tool for graphs
Selected Tools• iPerf
• Network performance testing tool• Simultaneous TCP connections• Can vary window sizes• Basic throughput measurement
Documentation: https://iperf.fr/
Setup• CSE Machine CSE Machine
• Download and compile iperf on the CSE network• Start one machine as a client and the other as a server• Run the experiment with varying number of connections, window
sizes, and buffer sizes
• CSE Machine External Endpoint• Download and compile iperf on laptop• Address reservation• Port forwarding• Start CSE machine as client and laptop as server
Setup• Shell scripting
• Learned some basic shell scripting and created a script that would test the CSE machines while logged out of SSH
Results
1 2 3 4 5 6 7 8 9 10 11 12 13 14200
250
300
350
400
450
500
550
Throughput with Varying Concurrent TCP Connections: March 12, 2015
1 Connection
2 Connections
5 Connections
10 Connections
Experiment
Co
mb
ined
Th
rou
gh
pu
t (M
bp
s)
CSE Machines: Gamma BetaWindow Size: 20kb (default)Date: March 12, 2015
Results
1 2 3 4 5500
550
600
650
700
750
800
850
900
950
1000
Throughput with Varying Concurrent TCP Connections: March 24, 2015
1 Connection
2 Connections
5 Connections
10 Connections
Experiment
Co
mb
ined
Th
rou
gh
pu
t (M
bp
s)
CSE Machines: Gamma BetaWindow Size: 20kb (default)Date: March 24, 2015
Results CSE Machines: Gamma BetaDate: March 25, 2015
2Kb 5kb 10kb 20kb 50kb 100kb 200kb
1 Conn. 20.5 194.3 546 554.5 694.8 765 698.5
2 Conn. 41.3 205.3 847.5 867.8 932.3 929.8 629.3
5 Conn. 137.3 439.8 924.8 939.3 939.3 940.8 940.8
10 Conn. 300 600.3 926 938.5 938.5 940 941.3
• A test with each pair of settings was performed 4 times and the mean was taken.
• All results in Mbits/sec
TCP Window Size
# C
on
nec
tio
ns
0 20 40 60 80 100 120 140 160 180 2000
100
200
300
400
500
600
700
800
900
1000
1 Conn.
2 Conn.
5 Conn.
10 Conn.
Results Machines: Gamma Laptop (home)Date: March 25, 2015
2Kb 5kb 10kb 20kb 50kb 100kb 200kb
1 Conn. .493 .997 1.21 2.54 5.05 9.73 9.92
2 Conn. .983 1.65 2.56 5.06 10.53 15.48 15.63
5 Conn. 2.39 4.22 6.1 12.38 15.98 16.02 16.15
• A test with each pair of settings was performed 4 times and the mean was taken.
• All results in Mbits/sec• Could not test more than 5
connections at once, presumably because of security restrictions somewhere between CSE machine and laptop
# C
on
nec
tio
ns
TCP Window Size
0 20 40 60 80 100 120 140 160 180 2000
2
4
6
8
10
12
14
16
18
1 Conn.
2 Conn.
5 Conn.
The Question• So if multiple TCP connections are opened in
parallel, does the total throughput improve?
>?
Apparently It Does
Analysis• After examining the data, we surprisingly found our
hypotheses to be experimentally incorrect.
• Why might this behavior occur? Some ideas:• Limit on the rate an individual socket or connection can transmit• TCP streams being split up as they travel through the Internet
• Don’t necessarily take up a combined “fair share” of bandwidth
• Stdlinux may be running on a virtual machine• iPerf itself could be faulty (unlikely, but possible)
Analysis• Per iPerf’s documentation,
• “If the total aggregate bandwidth is more than what an individual stream gets, something is wrong. Either the TCP window size is too small, or the OS's TCP implementation has bugs, or the network itself has deficiencies.“
• We varied the TCP window size a lot, so we don’t believe that this is the issue.
• There is most likely something interesting happening with the network itself or the OS’s TCP implementation
Future Extensions• Set up multiple clients and servers on different ports
• Try running tests on an isolated network
• If the unexpected observed behavior is correct, design applications using multiple connections to improve throughput
Concluding Remarks• Based on TCP’s congestion control algorithm, we
assumed that increasing the number of TCP connections would not improve throughput
• We used iPerf as a tool for network analysis• Throughput was very different for single vs multiple
connections
• Theoretically, we believe our hypotheses are correct• Experimentally, we were proven wrong