[gPXE] any negative implications of setting TCP window size to (65536 - 4) ?
Joshua Oreman
oremanj at rwcr.net
Mon Feb 1 18:38:41 EST 2010
On Mon, Feb 1, 2010 at 6:08 PM, Peter Scheie <peter at scheie.homedns.org> wrote:
> The default setting for the TCP window size, as set by #define
> TCP_MAX_WINDOW_SIZE in src/include/gpxe/tcp.h, is 4096. With this setting, it
> was taking 8-10 minutes for gpxe to download my 22MB initramfs over the
> internet. At the suggestion of people on #etherboot, I changed it to 65536 - 4,
> which was listed in tcp.h but commented out in favor of the 4k setting. At this
> new setting, downloading the 22MB file takes only about 30 seconds!
>
> I understand that gpxe has no ability to handle out-of-order packets, so a
> possible negative effect is that if there is disruption in the packet flow, the
> whole window will need to be resent. But in my testing so far, even if that is
> happening, downloading is still much faster. Are there any other potential
> pitfalls from using the larger window size? Why is the default set so low?
I think the problem relates to gPXE's memory constraints. For various
reasons relating to boot-time memory constraints, we use a fixed-size
heap; currently its size is set at 128kB, and a 64kB window size would
take fully half of that space away. Some network drivers need lots of
memory too (sky2 for example).
On the other hand, we're probably safe bumping it to 256kB. Thoughts
from other developers?
-- Josh
More information about the gPXE
mailing list