Your broadband speed not what you expected? ~ MyBroadband
7 November 2011
Your broadband speed not what you expected? ~ MyBroadband
ATC CEO Wayne de Nobrega explains why you may not get the Internet performance you thought you would.
Whenever one talks about the performance of an internet connection, it’s commonplace for users to lament that they are not able to utilise the full capacity of the connection when downloading files from international servers.
This may be a result of a congested Internet Service Provider (ISP) network, but more often than not, it’s a case of the inherent limitation of the Transmission Control Protocol (TCP), which is not widely understood.
The two primary elements that have the biggest impact on throughput are the TCP window and latency.
The TCP protocol is a very chatty protocol. This means that whenever a packet of information is transferred from a sender to a receiver, the receiver has to send an acknowledgement that the packet has been received correctly.
Waiting for an acknowledgement for each packet before sending the next packet will severely limit the potential throughput. To overcome this, computers make use of something called a TCP window.
A TCP window is simply the amount of unacknowledged data the sender can have outstanding in bytes.
On most computers, the default value is 65,536 bytes; this is the default amount a user can send, without having received any packets that acknowledge receipt.
The second factor is the latency. Latency is the time it takes for a packet of data to be sent from the sender to the receiver and back.
The physical distance between the sender and the receiver is the biggest contributor to the latency figure.
The typical latency to a server in South Africa will be between 10 and 30 ms depending on the path. The latency to a server in the United States will be in the region of 250 to 400 ms.
It is this combination of the TCP window size and the latency that directly impacts the maximum throughput users can achieve.
The formula to calculate the throughput is as follows:
- Maximum throughput in bits per second = TCP window size in bits divided by the round trip latency
- Assume a default TCP window size of 65,536 bytes (65,536*8 = 524288 bits)
- Downloading from a South African server with a latency of 20ms (0.020 seconds), the maximum throughput can be calculated as follows:
- 524,288 / 0.020 = 26,214,400 bit/s or 26Mbit/s
Downloading from a US server with a latency of 300ms (0.3 seconds), the maximum throughput is:
524,288 / 0.3 = 1,747,626 bit/s or 1.7 Mbit/s
This is a significant difference. Even with a 100 Mbit/s fibre connection between your office and a location in the US, you will still not be able to get more than 1.7Mbit/s with a default TCP window.
Thankfully, it is a limitation that can be overcome. One way of achieving this is to use a download manager. A download manager performs a number of simultaneous downloads, which would probably have a limit of 1.7Mbit/s per downloading item. However, this is not always possible and depends on what the user is doing.
Another alternative is to change the TCP window size on your computer (as explained in the RFC 1323 document drafted by the Internet Engineering Task Force) to match your potential line capacity.
Be careful not to make this number too big as it can have a negative impact on the line performance if the line runs errors where packets get lost and have to be retransmitted.
Assuming you are not dropping any packets, you can calculate the ideal TCP window size with the following formula:
•Bandwidth-in-bits-per-second X Round-trip-latency-in-seconds = TCP window size in bits / 8 = TCP window size in bytes
If you access a server in the USA that will have a latency of 300ms, from a 4Mb/s connection, we can calculate the TCP window size as follows:
4 194 304 X 0.3 = 1 258 291
1 258 291 / 8 = 157 286 window size in bytes
Thus, an ideal connection would have a TCP window size of 157 286 bytes.
This may be a result of a congested Internet Service Provider (ISP) network, but more often than not, it


