RWIN (TCP Window Size) negotiates properly after upgrading to SP2

G

Guest

Has anyone experienced any drastic downsteam speed improvements after
upgrading to Windows XP Service Pack 2. I can see that my downstream speed
increase up to 10 times when running Speedtest sites, such as SpeakEasy.net.

One observation I've noticed is that the TCP Window Size does not negotiates
when I ran SP1. If I set my RWIN to 100, it will always stay at 100 bytes
for the complete duration of the Speedtest duration. After upgrading to
Service Pack 2, I no longer see this problem. From my Ethereal Captures, I
now see that it starts at 100 bytes, but right away negotiates at a higher
rate of 5724. I was not able to find any documenation on the Microsoft's Web
Site that talks about the RWIN value, but I know this directly related
because after removing SP2, the problem came back.

The RWIN value can be modified under: HKEY_LOCAL_MACHINE\System
\CurrentControlSet\Services\Tcpip\Parameters\TCPWindowSize

I'm very confused why this is the case. Should the RWIN value ALWAYS
negotiates?? Does the SP2 addresses this issue? All I see is that SP2 has a
Winsock Self-Heal feature, not sure if this is related.

Any insight to this is greatly appreciated.
 
G

Guest

Apparently SP2 uses a different registry setting than SP1:

Per SpeedGuide.net (http://www.speedguide.net/faq_in_q.php?qid=221), those
of us running XP SP2 need to use a different registry control to set the max
TCP window size.

Under Windows XP SP2, the "DefaultReceiveWindow" value in the AFD branch of
the Registry takes precedence over the RWIN values in the TCP branch. Under
SP1, it is the other way around, the values in the TCP branch override the
AFD value and go out in TCP packet headers.

AFD branch:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters


What is the difference between TcpWindowSize, DefaultReceiveWindow, RWIN,
etc. ?

There are 3-4 places in the Windows Registry that affect the TCP Window.
Under Windows XP/2k/2k3 they are: TcpWindowSize, GlobalMaxTcpWindowSize,
DefaultReceiveWindow (in the AFD Registry branch). The TCP Window is also
refered to as TCP Receive Window, or RWIN for short.

TCP packet headers negotiate one value, the size of the TCP Window. There is
only one 16-bit spot in TCP packet headers reserved for this value (up to
2^16, or 65535). There is an additional scale factor in an optional header
introduced by RFC 1323 (Tcp1323 Options). With this optional header addition,
one can obtain TCP Window values larger than 65535 by multiplying the
original unscaled 16-bit TCP Window by a scale factor that's a power of 2. So
technically, TCP headers contain one unscaled TCP Window value, and an
optional scale factor.

The 3-4 places in the Windows Registry all affect this one TCP Window value
in TCP headers. One registry parameter sets it globally, another for each
network adapter, one copy in the AFD branch of the Registry, etc. Also, in
different versions of Windows, different Registry values take precedence and
go out in the actual TCP packets during the TCP handshake. Even though there
might be some difference in how Windows handles the different Registry
parameters internally, ultimately it uses one of them and that ONE goes out
to the network. Which one depends on the Windows version.

Ultimatey they all affect the same one value that exists in TCP packets.


Note: Under Windows XP SP2, the "DefaultReceiveWindow" value in the AFD
branch of the Registry takes precedence over the RWIN values in the TCP
branch. Under SP1, it is the other way around, the values in the TCP branch
override the AFD value and go out in TCP packet headers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top