[Asus Transformer TF700] lucius.zen:
TCP Congestion Algorithm Testing

Hey Guys,

Did some testing of TCP congestion algorithms to determine which is best for use on our device. For a brief explanation of TCP/IP protocols and network congestion control algorithms see the "Appendix" at the bottom of this post.

Overview:

I decided to test "cubic" as it is default as well as "reno", "lp", and "westwood" because what little data others have gathered indicates these algorithms have the most promise but need further testing. I ran more tests using "cubic" because the variance of the data set was very high. If we want to accurately compare mean values from two data sets we must be sure that the variance within the two data sets does not exceed the variance between the two data sets. This is typiclly done using a formal statistical hypothesis test, however, I am too lazy to calculate the standard deviation of each set. Thus, to ensure variability doesnt throw off our comparison I ran extra tests using cubic so that we can rest assured despite having not utilized formal hypothesis tests. I won't go into details but comparing the means of seperate data sets is completely useless unless we account for variance within the data through hypothesis tests or other measures. Do not listen to anyone who tells you otherwise lol. Averages are moot unless variance is accounted for.

Method:

The following alrogithms were tested in sequential blocks. Within each block tests were completed immediately following each other - nothing was done in between tests aside from taking a screenshot to record data. After completing a block of trials a terminal was opened and the TCP congestion algorithm was changed utilizing a script. The next block of tests immediately followed. All tests were completed from exactly the same location. This methodology was utilized to keep conditions as consistent as possible for the purpose of minimizing the influence of external factors, which are particularly plentiful when testing wifi speed.

Measures:

n = number of tests

p = ping (ms)

d = download speed (mb/s)

u = upload speed (mb/s)

v = standard deviation - not actually calculated - simple ranking of the relative variance of each data set - yes, this involved the use of eyes and not a calculator; however, I made sure I ran enough tests to understand the degree of variability within each data set

Results:

Cubic:

n = 14

p = 57.6

d = 8.65

u = 6.19

v = 4

LP:

n = 8

p = 40.3

d = 9.07

u = 4.51

v = 1

Reno:

n = 8

p = 42

d = 8.47

u = 3.53

v = 3

Westwood:

n = 8

p = 39.5

d = 9.66

u = 4.28

v = 2

Conclusion:

It appears that "westwood" is the most promising TCP congestion algorithm. However, I would like to run "reno" and "westwood" through another 8 trials to increase confidence as their data had a moderate degree of variance. The algorithm "yeah" also is yet to be tested. Once these tests are finished I will do another preliminary comparison to estimate which two TCP congestion algorithms are best. The top two algorthms will then be subjected to a formal hypothesis test to confirm my final results.

Appendix - TCP/IP Protocols and Network Congestion Control Algorithms:

TCP/IP is a core set of communication protocols used to transfer data over the Internet and similar networks. IP packets are the vehicle devices use to transfer data between an application program and a web host. They are comprised of a header containing the source/destinatin address (among other things) and a payload, which contains the actual data to be sent. TCP, part of the transport internet layer, provides intermediate communication between an application program and a host.

When sending large chunks of data an application program can issue a single request to TCP instead of breaking down data into a series of IP packets and requests. Due to network congestion and other factors IP packets are often lost. TCP maintains the ordered delivery of packets by detecting packet loss, requesting retransmission, reordering data, and minimizing network congestion. When a host receives a stream of packets it reassembles the data into the form that it was originally sent. Once the receiver confrims the soundness of the data it sends a packet acknowledging its retrieval. To avoid overloading a connection between a program and a host this aknowledgement must occur before more packets can be sent/recieved.

For each connection TCP maintains a congestion window. The TCP congestion window is maintained by the sender and is used to prevent network congestion/overload due to packet loss. When packet aknowledments are received the size of the TCP congestion window increases exponentially until a timeout occurs or the receiver reaches its bandwidth limit. Thus, as more packets are acknowledged the maximum segment size (specifies the largest amount of data in a single TCP segment) of the congestion window becomes larger; every round-trip time the maximum segment size effectively doubles. A mechanism called "slowstart" controls the maximum segment size of the TCP congestion window. To prevent network overload TCP congestion avoidance algorithms modify TCP window size, "slow-start", and the slow-start threshold. Thus, TCP congestion avoidance algorithms have a significant impact on the speed of packet delivery between a sender and receiver