TCP in Vista and Server 2008


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on March 06, 2008 at 13:50:51:

This is from Mark Minasi's newletter. Guru of MSFT server and workstation products.

---------------------------------------------------------------------Vista and 2008's New TCP Windows
Nope, this isn't about IPv6 -- that's the new IP; I'm talking here about the new TCP. How new? Well, in some ways, not very new at all, as it implements a standard created in 1992. But that's not to say that Microsoft hasn't been supporting that standard, and thereby hangs the tale...

TCP is the piece of the Internet networking software that takes care of what might be called the "conversations" in Internet communication. For example, when my email server sent the notice of this newsletter to your email server, they first set up a sort of conversation, where they agreed about how to communicate with one another. One of the things that the receiver and sender must agree upon is the size of the "TCP receive window." That's a bit of RAM set aside on the receiver, a buffer where the receiver can hold onto data that it has received from the sender but hasn't yet had time to handle. (Incoming data must be checked for transmission errors and then the data's got to be picked up by its destined application. So, for example, if my email server were receiving a stream of TCP data, then that data's got to be checked for transmission errors -- the TCP software in Windows does that -- and then that data's got to be retrieved by the SMTP software on my email server.) Every TCP connection has its own separate window, so you're allocating RAM every time you connect to a Web site, or when grab your email or the like and, similarly, you free up a bit of memory every time you close a connection.

But how much RAM to set aside for these TCP windows? As I see it, there are four major factors that determine the TCP window sizing process.

RAM's not free: first, of course, there's the matter of RAM and the amount you're willing to burn for each TCP connection, so TCP windows shouldn't be any larger than necessary.
Line speed: faster links mean that the sender can transfer more data more quickly across a noise-free, delay-free Internet connection. But if you've got a small window, then that fast connection will cause the sender to fill up the the receiver's TCP window quickly. The sender knows the size of the receiver's window, and so senders will stop transmitting once they calculate that they've filled up the receiver's window, waiting for the receiver to tell it, "I've cleaned out my TCP window, please send me more." That sort of wait means precious Internet bandwidth goes to waste, and the concomitant bad Net karma can really stack up that way. A bigger TCP window means that the sender can keep shooting that data down the line even if the receiver's too busy to respond for a second or two. In short, a small TCP window can cause you to lose a lot of the benefits of a fast connection.
Application speed: how fast is your downloading software? If you're downloading some huge file like, say, Vista SP1, then Internet Explorer's going to busy watching your TCP receive window, waiting for your TCP software to perform error checks on the data so that IE can then grab that data out of the buffer and dump it onto the hard disk, clearing space in the buffer. But IE competes for CPU time with other processes running on your system. In other words, you'll transfer files over the Internet faster if you don't do anything on your computer but download files. But that's silly — isn't the whole point of downloading big files to have an excuse to play a game for a couple of minutes? Well, okay, maybe not the whole point, but seriously: doing something else while downloading, whether it's opening a Word file, watching an already-downloaded video (educational, of course), or listening to a tune takes CPU power away from the target application (IE) whose job at the moment is to keep that TCP window empty so that your system doesn't have to tell the sending system, "hold on a minute while I catch up." One way to make IE's job easier is, again, to only run IE. Another way is to simply allocate a bigger TCP window, so that your system has a bit of slack for the occasional moments of high CPU utilization. In short, big TCP windows mean less worrying about how much CPU your client application's getting in comparison to other processes.
Round-trip time (RTT) delay: the speed of every "conversation-oriented" type of communication (like TCP) is, of course, largely determined by the line speed — everyone knows that downloading a file on DSL is faster than downloading it on dial-up, right? Well, not always. Any time one computer asks another computer a question and awaits a response, there are always delays. For example, if the receiving computer said to the sender, "okay, I'm ready for the next block of data," then the sender might have go get that data from its hard disk, and that's a delay that has nothing to do with line speed


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]