[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#401435: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later



On Sun, Apr 01, 2007 at 09:30:16AM +0200, Frans Pop wrote:
> > TCP window scaling as such was by default enabled in earlier Linux
> > kernel versions, too, but the default window *sizes* were different,
> > much smaller. These are set in the tcp_rmem/tcp_wmem pseudo-files in
> > the same directory; you could just run something like
> >
> > echo 4096 65536 65536 > /proc/sys/net/ipv4/tcp_rmem
> >
> > to reset them to values supported by just about anything.
> 
> I'm willing to add that info, especially for the installed system. Do 
> values in tcp_wmem also need to be modified or is modifying tcp_rmem 
> sufficient? What's the difference between the two?

The r stands for read, w stands for write. tcp_rmem affects the downloads,
tcp_wmem affects the uploads.

I'm not sure how the broken routers react, but I'd guess that the tcp_rmem
is the culprit because most non-advanced users do more download than upload.

The first value in those files is the minimum window size, the middle is the
default, and the third value is the maximum. TCP window size can (and
should) be stretched as allowed by the hardware; if you enlarge it, you make
more bytes go through the pipe in the same time intervals, so you need to
have CPU power to process it and memory to hold it. And so do all hops on
the packet path (routers and switches alike).

The thing that happened was that the kernel developers got tired of the
years-old fixated default maximum, and made it vary according to local
hardware parameters.

Here's an example default from a 2.4.31 machine:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   174760
4096    16384   131072

(You can see there how killing off TCP window scaling altogether would have
been a bad idea - no packets would have been allowed to grow even a little
bit past the default size, as they were allowed in the old kernel versions,
even if by a fairly small amount.)

Here's an example default from a 2.6.18 on a machine with 384 MB RAM:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   524288
4096    16384   524288

And here's an example default from a 2.6.18 on a 2 GB RAM machine:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   4194304
4096    16384   4194304

I never checked exactly what the parameters for this new variation are,
but AFAIR RAM size is one of them.

This worked out well for the vast majority of people, but as always, there
are machines that don't follow protocols and can't handle these variations.
This is somewhat similar to the TCP ECN situation; Linux kernel using
features and finding a few bumps in the wild.

-- 
     2. That which causes joy or happiness.



Reply to: