Subject: Re: Why do large downloads fail ?

From: Vernon Schryver <[email-masked]>
Date: Fri, 22 Oct 1999 11:54:03 -0600 (MDT)

> From: Arivu Mani <[email-masked]>

> I have experienced the same problem here while downloading with Windows
> NT. Start downloading a 3MB file using ftp.exe and it would time out.
> While the same file is easily downloaded with Solaris.
> ...

I've made additional measurements that say that with a 300 ms RTT instead
of the ~500 ms I reported yesterday, Windows 98 will give up after less
than 30 seconds.  That's consistent with always giving up after 5
retransmissions, binary exponentially backed off with the first at 3 times
the RTT.  With the same path and at the same time, I found BSDI's BSD/OS
4.1 keeps trying for about 600 seconds or 10 minutes.

If your connection happens to have a reasonable RTT of 50 or evey 100 ms
instead of the very 300-500 ms. I'm testing at a pariticular site that
uses modems, it seems likely that Windows would give up after only 5 or
10 seconds.  It's easy to suffer a 5 or 10 second hiccup due to a routing
flap or other bad thing, particularly between here and Microsoft.com.
V.34, v.32bis, or v.32 modems seem to spend about 30 seconds "retraining"
when they decide the phone line has change significantly.

If you ask me always givin up after 5 retransmissions violates at least
the spirit of RFC 1122 and is a Bad Idea(tm).  What's worse, as far as I
can tell, WINSOCK 2 has no provisions such as SO_RCVTIMEO.  (There are
explicit words in the WINSOCK 2 document saing SO_RCVTIMEO is unsuported.)

In other words, it sounds like a Microsoft bug.

Vernon Schryver    [email-masked]

---

From: Keith Owens <[email-masked]>
Date: Sat, 23 Oct 1999 06:40:26 +1000

On Fri, 22 Oct 1999 11:54:03 -0600 (MDT), 
>In other words, it sounds like a Microsoft bug.

There is a registry entry to increase the number of retries.  Under
Hkey_Local_Machine\System\CurrentControlSet\Services\VxD\MSTCP (not
Parameters), add a new value.  The value name is MaxDataRetries, it is
a string value, set the value to something larger than 5, "64" has been
tried and works.  Increasing this value greatly reduces the likelihood
of a session dying too soon.  It may work for Windows NT, the Microsoft
documentation is unclear.

Be careful adding the registry entry.  It must be a string value and
you must type the value in without quotes, regedit will add the quotes.
If you define the wrong type or include non-numeric characters in the
value then regedit will accept it without complaint.  TCP/IP will not
complain either, it silently takes the value as 0 retries.  The only
way you can tell if the value was mistyped is when you lose one packet
and the connection dies IMMEDIATELY.  Windows is not exactly the
world's most reliable software, and we use it for mission critical
software - sigh.

Getting a good value for MaxDataRetries is trial and error.  You want a
large value on fast links and a small value on slow links.  As far as I
can tell, the only way to pick up any change to MaxDataRetries is to
reboot Windows.

"Your mouse has moved, you need to reboot Windows".

This message was brought to you by exmh, qmail and Linux 2.3.22 in a
Microsoft free zone.