dslreports logo

    All FAQs Site FAQ DSL FAQ Cable Tech About DSL Distance DSL Hurdles »»


how-to block ads


RWIN (TCP Receive Window) is the amount of data that your computer can accept without acknowledging the sender. If the sender has not received acknowledgment for the first packet it sent, it will stop and wait. If this wait exceeds a certain limit, it may even retransmit. This is how TCP achieves reliable data transfer.

Anyway, this start/stop action slows down the throughput considerably in some cases. Hence, RWIN should be large enough to sustain continuous data transfer. By default, this window is too small (8760 for Windows 95/98/98SE/NT and 17520 for Windows ME/2000/XP) for many types of DSL and Cable (Broadband).

Raising RWIN creates a larger window, which allows more information to come through non-stop, up to a point. After this point, no difference will be noticed for the particular connection. For each user, this point can/will vary and is determined by (bandwidth * delay) product.

Please note that there is no single value for all hosts on the Internet. You have to allocate some reasonable extra RWIN (say 20-25%) for variance from average latency

by Pinan See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:23:37

Well, maybe.

It involves clicking the "more details" portion of the tweak test result, and then looking down at the bottom right hand side for an entry saying "RTTavg."

Take this value and use it for latency in the formula: (latency) x 1.5 x (advertised speed in kbps) divide by 8

Example: MSS is 1460, RTTavg is 125ms and advertised download speed is 1500kbps.
125 x 1.5 = 187.5
187.5 x 1500kbps = 281250
281250 divide by 8 = 35156
35156 divide by 1460 (MSS) = 24.07
Round up to next even number = 26
26 x 1460 = 37960 (optimal RWIN)

Feedback received on this FAQ entry:
  • robo606: Use the value from "RTTavg (last)" at the "bottom right" in the "more details" portion of the tweak test result.

    2013-03-14 21:00:12 (dwlamborg See Profile)

  • Should I use the value from "RTTavg (last)" at the "bottom right" or "RTTavg" located higher?

    2009-09-26 11:06:12 (robo606 See Profile)

  • ISPs sell in bits.. kilobits or megabits.

    2009-05-10 20:49:43 (redxii See Profile)

  • Is there an easier way to calculate my RWIN? (#6181): kbps = Kilo bytes per second? or Kilo bits per second?

    2009-05-10 15:44:20

  • MSS = MTU - 40 bytes (IP and TCP header overhead) http://www.internetweekly.org/llarrow/mtumss.html

    2008-08-15 16:50:11 (mnottage See Profile)

  • what the heck is MSS?

    2008-07-14 19:52:39

by garp123 See Profile edited by JMGullett See Profile
last modified: 2007-02-27 09:41:11

RWIN (Receive Window) is the single most important tweak. Raising Rwin from default (8760 for Win95/98/98SE/NT and 17520 for WinME/2K/XP) may greatly improve download speeds, depending on your line. Why? Here is my kindergarten analogy:

Default RWIN for broadband is like having a tiny straw in a thick milk shake, only so much can get through the straw (line) so fast. By putting a larger straw (higher RWIN) in that same thick shake, you allow more shake (data) to come through sooner (thus improving speeds), to a point that is -- after which there is no more improvement, and shake (data) can start spilling all over (packet loss) if your line is lossy. Thus, the key is to find an RWIN that fits your line just right.

The formula for finding your "ideal" RWIN is to take your latency (average ping time in ms x 1.5), multiply it by your advertised speed in kbps and divide that by 8. Or, use our RWIN calculator here.

Note: If setting RWIN below 8192, try using even multiples of MSS (see "MSS requested" on Tweaks Test).

Note: If you have low advertised speeds, then raising RWIN may be uncalled for and have no affect.

by Pinan See Profile edited by JMGullett See Profile
last modified: 2007-02-27 09:44:58

Download DrTCP from this page to your desktop. Open it and enter desired value for TCP Receive Window (RWIN). Then click Save, Exit and Reboot your PC so that the change will "take."

by Pinan See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:25:21

The RWIN calculation requires a latency value for a large packet, pinged some distance and averaged.

To find this value, open a command prompt and type: ping -t www.xxx.xxx -l 1472
(where www.xxx.xxx is any URL you like as long as it's fairly distant from you.)

Note that the -l is a lower case L, not an I. Also note that if you use PPPoE, use 1464 or lower, not 1472. In other words, use a number that is 28 less than your reported MTU.

If you are on the east coast of the US, for instance, you'd want to pick a western URL. Colleges seem to work well since their websites are generally located somewhere on campus.

If the pings time out, you've chosen a URL that is blocking ping. Press "Ctrl" and "C" together and the request will stop. Choose a different URL and try again. Once you find a site that responds, let it run for two or three minutes and then press "Ctrl" and "C" together.

A summary will be displayed showing an average result time in milliseconds. Multiply this value by 1.5 and use the result in the RWIN calculation formula.

Feedback received on this FAQ entry:
  • Ctrl + C does not produce expected results. Request continues with no summary

    2009-04-27 22:33:23 (budscyn See Profile)

  • I tried over 5 different urls. All timed out, I gave up.

    2008-10-12 19:39:38 (dgriff23 See Profile)

by garp123 See Profile edited by JMGullett See Profile
last modified: 2007-02-27 09:54:48

Compute required TCP receive window size (RWIN)
Bandwidth kbpsLatency ms bytes
Bandwidth is your advertised (download) speed.
Latency (i.e. delay) should be your large packet ping time. Multiply yours by 1.5 for this tool.

Feedback received on this FAQ entry:
  • Time to update _again_! Had to use 99999 kbps for 100 Mbps connection.. ;o

    2009-08-18 16:43:39 (PingPong3 See Profile)

  • Time to update! Had to use 9999 kbps for 10 Mbps connection. :)

    2009-06-09 01:52:41

  • 1. In RWIN Calculater, kbps = Kilo bits per second or Kilo bytes per second? 2. only 4 digits can be entered in the RWIN Calculator Thanks.

    2009-05-10 15:37:45

  • RWIN Calculator (#677) (No longer here because it doesn't work on this site.)

    2009-01-06 14:42:06 (DionisBah See Profile)

edited by redxii See Profile
last modified: 2009-06-10 18:52:01

Take your average latency, which is ping + 50% (in the event of slower lines), multiply that number by your proposed (advertised) speed and divide that value by 8. You have your raw RWIN.

Example: 50ms average latency x 1.5, with 1500Kbps available (purchased) downstream bandwidth:

75 x 1500kbps = 112500 divided by 8 = 14063 RWIN.

However, when dropping RWIN below 8192 (which is Windows default for Windows 95/98/NT, while Windows Me and 2000 use default of 16384), try using even multiples of MSS. Your MSS is listed on the Tweaks test.

For more information please refer to this page.

by DrTCP See Profile edited by JMGullett See Profile
last modified: 2007-02-27 09:58:13

If each data packet had to be acknowledged before another could be sent, then performance could suffer due to the delay time needed for the data packet to reach the receiver, plus the time needed for the acknowledgment packet to get back to the sender. To avoid this delay, the sender is allowed to keep transmitting data packets prior to receiving acknowledgments (Ack's) up to a maximum "window" size (RWIN) advertised by the receiver, normally large enough for several packets. The larger the window, the more packets that can be sent before needing an acknowledgment. However, larger windows can require more packets to be retransmitted when a transmission error occurs. Hence, the receive window size needs to be large enough to keep data flowing continuously, but it should not be excessively large.

Feedback received on this FAQ entry:
  • Can we get an addendum added to this FAQ? If you'd like to read the (gory) details, there is a thread on the Comcast forum here: http://www.dslreports.com/forum/r21567208-Business-Class-Service-not-as-fast-as-it-should-be And suffice it to say, there are some folks who are misinformed (to put it lightly) about how TCP windowing works. They will accept what the tweak test tells them (the RWIN range), but fail to extrapolate exactly what it means and why it's providing a range. Can we update this FAQ to explain that while it may cause more packets to be retransmitted, the overall throughput would still likely be higher than having an RWIN cut theoretical throughput to 1/2 what it _could_ be? Another addition I'd like to see added is a mention of the fact that each connection will negotiate a maximum RWIN which may never come close to the setting specified by DrTCP or whatever is configuring the hosts' TCP stacks. That is, just because you set the MAX RWIN to 1M, doesn't mean each connection will actually have a receive buffer that large. Essentially, I'd like the record set straight via either a new FAQ here, or additions to the existing ones. Perhaps if folks see it published here, they will be more apt to believe it, instead of dismissing it. Thanks for your consideration! Josh

    2008-12-15 19:28:02 (pflog See Profile)

by Pinan See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:27:40

This depends on the OS (operating system) that you're using.

For Win95/98/98se/ME, do this:

Click on Start/Run and type in "regedit" (no quotes). Then, click down through HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/VxD and single click on the MSTCP folder.

If your RWIN is still at Default, then no setting will show here. You will need to create your own in this way:

Click on Edit/New/String Value. Type in "DefaultRcvWindow" (no quotes). Click outside of field once, then double click on new entry and enter the value you choose (decimal). Close the window and reboot your PC for setting to "take."

For 2K/XP, this is the path:


In 2K, it is called "TcpWindowSize" and is a DWORD instead of a String Value. Create a new one in the same way as above, but choose DWORD instead of String Value. Value may be entered in decimal or hex.

Note: DRTCP will set all of these very easily.

by Pinan See Profile edited by JMGullett See Profile
last modified: 2007-02-27 10:01:36

When DirecPC software is loaded on Windows 2000, it creates a registry key called GlobalMaxTcpWindow and sets your RWIN there. DrTcp sets the RWIN at a key called TcpWindowSize. Unfortunately, the "Global" key takes precedence, so changes you make with DrTcp have no effect. You have two options for fixing the problem, both requiring direct editing of your registry with Regedit. You can either manually reset the RWIN at the "Global" key, or you can delete the "Global" key after which your DrTcp changes will have full effect. The key is located at HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters. Open the Parameters folder and find the key GlobalMaxTcpWindow. Then, either manually change the RWIN there or delete the key so that you will be able to set the RWIN with DrTcp.

Feedback received on this FAQ entry:
  • i got up to tcpip but didnt see any file saying parameters in my folder

    2008-08-02 13:40:37

by PetDude See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:29:54

You need to download the latest firmware, which has resolved this problem, at ftp://ftp.dlink.com/Gateway/di604/Firmware/.

by redxii See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:31:00

Unlike previous versions of Windows which had static receive window (RWIN) settings, XP Home Edition and XP Professional have dynamic settings.

Therefore, the default settings are based on maximum segment size (MSS) and Maximum Transmission Unit (MTU) setting, as well as responses from the Dynamic Host Configuration Protocol (DHCP) server and line speed. Windows uses even multiples of the MSS to calculate the RWIN, as described in the Microsoft Knowledge Base:

"The receive window specifies the number of bytes a sender can transmit without receiving an acknowledgment. In general, larger receive windows will improve performance over high (delay * bandwidth) networks. For highest efficiency, the receive window should be an even multiple of the TCP Maximum Segment Size (MSS)."

Feedback received on this FAQ entry:
  • is there a way to permanently change rwin?

    2014-12-31 10:48:48

  • XP doesn't have dynamic settings!

    2012-01-28 02:10:18

  • This information implies that you shouldn't change RWIN due to the fact that it is optimized dynamicly

    2009-11-16 15:19:18

  • Arre the dynamic settings like in vista? if it is dynamic like in vista then should we still tweak it?

    2008-09-15 23:36:54

by jazzman916 See Profile edited by JMGullett See Profile
last modified: 2007-02-21 16:32:46