Understanding Web Performance

TCP – The underlying protocol that powers most applications on the internet today, including HTTP, is a “reliable” “window-based” protocol. When talking about web performance, we are really discussing TCP performance.

The two variables involved in calculating the maximum possible TCP performance are:

  • Round-trip latency
  • End-to-end bandwidth

Both elements are equally important when determining the amount of data that can be on the network (“in-flight”) at any given time or the MPTR (maximum possible transfer rate).

TCP Windows

As mentioned earlier, TCP is a “window-based” protocol. To ensure reliable data delivery, the receiver only sends one window at a time, and it will not send the next window until the receiver acknowledges it has received the previous window.
During a TCP session, the receiving system tells the sender what it’s receive window size is.

Below is a table containing the default maximum TCP window sizes for major operating systems:

Operating System Default maximum TCP window size
Windows NT 64 kB
Windows 98, 98SE 32 kB
Windows ME 32 kB
Windows 2000 32 kB
Windows XP 32 kB
Mac OSX 32 kB

Maximum Possible Transfer Rate (MPTR)

Multiplying the round-trip latency by the end-to-end bandwidth provides you with the MAXIMUM possible transfer that any particular TCP virtual circuit will allow, assuming perfect Network Conditions. In a complex WAN, such as the internet, it is not realistic to expect to achieve the MPTR. A reasonable real-world expectation for internet transfers is 70% of MPTR.

Calculation

MPTR = End-To-End Bandwidth / RTT

Example Calculation

Average Round-trip latency for traditional, single location hosting: 100ms
Windows XP default maximum TCP receive window: 32kB.

MPTR = 32 / (100 / 1000)
MPTR = 320 kiloBytes/s or (2.5 Megabits/s)

This it the maximum possible TCP transfer rate that can be achieved, assuming there are no dropped packets, and that all routers in the path have at least 320kB/s of bandwidth available at all times. With today’s saturated broadband networks, a reasonable real-world expectation is 70% of MPTR, or 224kB/s (1.8 Megabits/s) in this case.

Increasing the MPTR

In order to increase the MPTR, one of two things must happen: an increase in the TCP buffer size, or a reduction in latency.

It is simply not practical to expect or request end-users to modify operating system configurations; the only viable option is to decrease the latency. This is the fundamental philosophy behind our Anycasted Content Delivery Network.

Revised Calculation

Average Round-trip latency for CacheFly Content Delivery Network: 35ms
Windows XP default maximum TCP receive window: 32kB.

MPTR = 32 / (35 / 1000)
MPTR = 914 kiloBytes/s (7.3 Megabits/s)

Real World MPTR (70% Rule):
640 kiloBytes/s (5.1 Megabits/s)

Comparison

Platform Throughput (Bytes) Throughput (Bits)
Traditional Hosting 224kB/s 1.8 Megabits/s
CacheFly 640 kB/s 5.1 Megabits/s
Performance Increase 416 kB/s (286%) 3.3 Megabits/s (286%)

Decreasing latency brings a substantial performance benefit, without requiring or expecting users to perform any operating system modifications. The TCP protocol simply
does not cope well with high-latency networks such as the internet. The answer is clear:

Change the latency component of internet.

That basic premise allows CacheFly to deliver up to 10x performance.

Conclusion

The MPTR is a limitation of the TCP protocol, which was designed with high-bandwidth, low latency networks in mind.
While there are many programs and registry patches available to tune the TCP window size settings, very few internet users are savvy enough to modify their TCP settings.

The sender or receiver in these examples could be connected via DS3, Fast Ethernet, Gigabit Ethernet or even OC48; the maximum possible speed to achieve to a Windows XP machine that has a RTT of 100ms is always 320kB/s, regardless of link speed.

The only effective method for increasing performance is to reduce latency. BestHop™ Global Traffic Management on average delivers a 65% reduction in latency when compared to single-location hosting, offering a MPTR nearly triple what traditional hosting can achieve.

2 Responses

  1. Lasonya says:

    Hey I am so grateful I found your web site, I really
    found you by mistake, while I was researching on Digg for something else, Regardless I am here now and would just like to say kudos for a tremendous post and all round enjoyable blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read much more, Please do keep up the great job.

  2. Nice post. I learn something totally new and challenging on blogs I stumble upon on a daily basis. It will always be helpful to read articles from other writers and use a little something from their websites.

Leave a Reply