The Finer Points of Tuning

  The previous sections in the site show you how to use two basic tweaks to increase your Internet speed, the Proxy Server & changing your TCP/IP Receive Window Size. There's some pretty good explanations on those pages about what those tweaks do and why they are needed. It's important that you have a basic understanding of those sections before continuing on. If not, visit the links above for a quick refresher.

What we haven't looked at yet though, is the finer points of tuning your connection to the Internet.

  While the Proxy Server is certainly a big part of the tuning equation - it's usage and reason for being is pretty straightforward. It does play a potentially major part in tuning but for now we'll concentrate instead on the TCP/IP Receive Window setting and later show how the Proxy Server fits into your finely tuned solution.

How the Receive Window Setting Applies to Your Connection

  In order to understand the Receive Window tweak you need to understand what happens when you connect to another computer on the Internet and start a data transfer...

  Let's assume that you are contacting Microsoft's server and downloading a large Service Pack with a small RWIN setting. When you communicate with Microsoft's server on the Internet, data is sent back & forth in a stream of packets. The Microsoft server breaks up the large file into small pieces. It looks like this;

Your Computer Data Packet Got it - send more Data Packet Got it - send more Data Packet Got it - send more Data Packet Got it - send more Data Packet Got it - send more Data Packet Got it - transfer complete Microsoft Server
(move your mouse over the icons from left to right to see how it works)

  In the above picture your computer is being sent data (the envelopes) in a stream from the Microsoft server. After each packet arrives your computer sends a reply back to the Microsoft server to let it know that it has successfully received each packet. Once there are no more packets left - the download is complete and the data gets written to your hard drive.

  There's two vitally important keys to a potential speed increase in this data transaction example. One, there is a great deal of communication going on between the two computers. Every time a packet arrives your computer must contact the Microsoft server to let it know that it successfully received the packet. Two, a large number of packets are required to transfer the file with a stock operating system - which means that a lot of communication must take place.

  This continued communication slows the transfer rate of the data down. Basically, your bandwidth is being used up with framing small packets and sending constant data back to Microsoft. Microsoft's server waits for your computer's acknowledgements before sending more data.

  So, if you increase the size of the Receive Window (RWIN) the packets will be larger, there will be less packets sent to you, there will be less acknowledgements required by your computer, and to top it all off Microsoft's server will spend less time waiting for you. Bottom Line: Your available bandwidth gets put to better use.

With a larger RWIN value the data transfer looks like this;

Your Computer Data Packet Got it - send more Data Packet Got it - send more Data Packet Got it - transfer complete Microsoft Server
(move your mouse over the icons from left to right to see how it works)

  For illustrative purposes you can see that we've gone from requiring 6 packets and acknowledgements down to 3. Because less bandwidth is lost due to this overhead more bandwidth is being allotted to the data itself. As well, the server at Microsoft is not wasting as much time waiting for your computer to send acknowlegements before sending more data. This is what makes the transfer faster when you use a larger Receive Window (RWIN) value.

If Larger is Better - Why Not Use the Largest RWIN?

  Using the largest RWIN value is a common mistake. In the previous examples I've omitted what happens when a data re-transfer occurs. Some of those packets that get sent across the Internet to your computer get damaged in transit. When that occurs they have to be re-sent. For example;

Your Computer Data Packet Got it - send more Damaged Packet Damaged - send again Second Attempt Got it - send more Data Packet Got it - transfer complete Microsoft Server
(move your mouse over the icons from left to right to see how it works)

  In this example a large packet arrived that was damaged. As a result the entire packet had to be re-sent from Microsoft. Any time that a packet gets re-transmitted due to damage your speed will drop considerably. The larger the packet size, the more time it takes to re-transmit it and the slower your speed will be. So a large RWIN setting has it's draw backs.

How do I Determine What RWIN to Use?

  As you can see it comes down to a compromise between using the largest RWIN size possible while at the same time avoiding speed decreasing re-transmissions. It's a balancing act. This is why I recommend that people start out with an RWIN of 64240. It's a good place to start, has shown great increases in speed and when a re-trasmission does occur, it won't cause much of a performance hit because the packets are still reasonably sized. My own setting tends to be in the neighborhood of 87600, anything much higher and my speed starts to fall off. It's quite visible if you test against a proper server and not a 'Speed Test' site. For more on that see the Speed Testing page.

  Choosing the correct RWIN for your connection boils down to a couple of things. First, the RWIN setting is really based on the amount of delay between your computer and the computer you are connecting to. Because of this the correct RWIN size would actually vary depending on where you go on the Internet. As a result, RWIN size should be based on the servers you tend to frequent most in your Internet surfing. It's an inexact science, to be sure, because on top of the wide variety of places you frequent, the Internet's delay is never constant!

Enter the Proxy Server

  By now you've probably realized that I'm an advocate of using a well-managed Proxy Server. Aside from the obvious benefits of having data cached close to you geographically, there's another benefit that's of potentially enormous importance with regards to tuning your connection.

   A Proxy Server is usually located close to you on your own provider's network. This usually means there is much less traffic contention between yourself and the Proxy Server then there is out on the global Internet. When a person uses the Proxy Server and starts surfing the Internet you are literally connecting to the Proxy Server.

  Because of this your RWIN setting will be adjusted against the Proxy server and not on a server located on the global Internet. There is a real and significant benefit to this - the Proxy Server is typically located close to you on your own network with less bandwidth contention and more consistant latency then a server located across several different networks in another part of the world. As such, tuning your RWIN against the Proxy Server is a great deal more predictable and less prone to the significant delays the global Internet sees.

The Long & Short

  Here's a simple list of how I would go about getting the best possible speed.

  • Check to see if using the Proxy Server for your ISP (if applicable) speeds up your connection. If so, then by all means - use it!
  • If the Proxy slows your conn

Usually you will see an increase in speed with the proxy server - provided the server is not overloaded. Shaw does a pretty good job of maintaing them so it's usually safe to use them. They could be slower if you are connecting to a company like Microsoft. The reason for this could well be that Microsoft's ability to push the data to you is greater then your local Proxy's ability. So in your case I believe what you have run into is that Microsoft's excellent network is highlighting your local proxy's limitations at the time of your test

Speed testing on the Internet is hard to do because so much changes so fast. For instance, when you tested how busy was Shaw's server? Also, how busy was Microsoft's server? Both of these heavily factor into the test. So a person has to do more testing to come up with a 'general' trend as to whether the Proxy does add speed.

Here's an example of my downloading Windows XP SP#1 using your Vancouver Proxy Farm.

No Proxy Used on This Download

Vancouver Proxy Used on This Download

In my case, at the time of this test, I still get a faster download using the Proxy Server. Each test was done with a flushed out web browser cache and the downloads were allowed to complete so I could get the 'average' speed reported by IE.

It's usually best to use the server closest to you. In my case there seems to be an issue with the Victoria Proxy Servers and I got a lot of time-outs trying to do a test - so I used yours :-) If the Victoria Proxy was working better I should see a larger increase as it is closest to me and is not overloaded.

The proxy should give you better speed in general even if it slows down some Microsoft downloads. This is because almost no-one has the network Microsoft does. Most of the servers on the Internet have cheezy connections. Let's assume you are connecting to a server that can only send out data at around 50K for arguments sake. Picture a typical company/site with one data connection to the Internet and one or two servers (this is the typical website). In this case if you used Shaw's proxy server it would be at least twice as fast if the item was cached (most likely) due to the company's small Internet ability vs. Shaw's Proxy Server. To me this would be most people's normal surfing trends as most places on the Internet have limited connections - unlike Microsoft. So the long & short would be that generally most Internet surfing would be a lot faster using the Proxy.

You can choose not to use the proxy for any sites that you like :-) You can add them to your exclusions list and that way if you encounter sites that are faster without the proxy or tend to cause issues when accessed through a proxy.

This way you get the best of both worlds :-)

Please address all Questions to the Forum