View Single Post
Old 03-01-2012, 22:56   #162
Chrysalis
cf.mega poster
 
Join Date: Sep 2003
Posts: 12,048
Chrysalis is cast in bronzeChrysalis is cast in bronzeChrysalis is cast in bronzeChrysalis is cast in bronze
Chrysalis is cast in bronze
Re: Small Download Speed Upgrade

Quote:
Originally Posted by Ignitionnet View Post
Nope that's probably Nagle and TCP delayed acks misbehaving.

Basic TCP. Window size indicates data that can be sent unacked, it doesn't indicate anything about amount of data that must be sent. In addition it gives the maximum TCP window size, this is a value that changes and starts of far smaller than the maximum due to TCP slow start.

The only loss of efficiency that an overly large window size can cause is where it's an odd multiple that doesn't fit too well with the server's transmit window and even this will cap transfer speeds at marginally below maximum, web browsing doesn't push bandwidth very hard.

EDIT:

Here's the start of a TCP transaction, note the window sizes - these are due to TCP slow start while TCP works out the link speed.

2269 77.606093 192.168.10.12 88.221.88.80 TCP 49402 > http [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=2 SACK_PERM=1
2301 77.640534 88.221.88.80 192.168.10.12 TCP http > 49402 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 SACK_PERM=1 WS=5
2302 77.640569 192.168.10.12 88.221.88.80 TCP 49402 > http [ACK] Seq=1 Ack=1 Win=17520 Len=0
2303 77.641481 192.168.10.12 88.221.88.80 HTTP GET /0/RTMS/Image/SPRO-Seller_C2C-ZIF_AugustHeader_Active_Q311-325x100.gi.gif HTTP/1.1
2380 77.676750 88.221.88.80 192.168.10.12 TCP http > 49402 [ACK] Seq=1 Ack=372 Win=6912 Len=0
This I have experimented, both on servers and my desktop.

On servers if I eg. set the tcp window to 2meg, assuming there be no downsides other than faster resource saturation, I soon discovered it absolutely murdered throughput in specific scenarios, not 100% of the time but a significant amount of the time.

On a XP desktop if I set the tcp window to 256k then downloading files was faster it even helped slower adsl never mind a faster VM connection, however web browsing was most defenitly slower, loading little smilies on sites like this and text pages was slower.

Whether this is down to bad/buggy implementation on the OS's in question or by design I dont know but I tested the results numerous times.

Interesting as well is delayed acks works superior on linux over bsd and windows, but linux are not adhering to RFC guidelines, they disable nagle when the data been transferred is small so it doesnt hinder stuff it likely wont benefit.

One downside with large windows is if there is congestion/loss, a retransmit is more expensive.

With auto tuning however its ok to set max window sizes very large (multiple meg) as it always scales up from a small size.
Chrysalis is offline   Reply With Quote