[clue-tech] Downside of increasing TCP window size?

Jim Ockers ockers at ockers.net
Sun May 8 11:46:53 MDT 2005


Hi Chris,

> If you never have issues with your connection then increasing the window
> size is fine; if you do have the occasional error then increasing window
> size will actually make your connection slower because it will take longer
> for TCP to recognize there is a problem and recover from it.

We're trying to "optimize" it so that an SSL file download over the MSAT
dialup actually works.  It almost never works right now.

The other clients who are on low latency network (i.e., terrestrial
broadband) never have issues.  The concern is that if we change the window
size to benefit the MSAT satmodem dialup, what will happen to the terrestrial
connections.

> TCP can negotiate the window size already, you're probably better off just
> letting TCP handle it.

Unfortunately TCP is designed for low latency networks, so it just doesn't
work on a high latency network.  You are correct that TCP can negotiate
the window size already, but it doesn't do it well if the connection is
high latency.

If you're not sure why this might be the case, iDirect has some good white
papers on their website www.idirect.net.  This one describes the network
acceleration:

http://www.idirect.net/GetDoc.asp?P=0&DC=3&F=2&D=19 (The_iDirect_Series_1000_Network_Acceleration.pdf)

You can also google for this, say "TCP satellite network latency window"

Here's a quote from http://www.potaroo.net/ispcol/2000-09/2000-09-latency.html :

"For TCP, the critical network characteristic is the latency. The longer the latency, the more 
insensitive TCP becomes in its efforts to adapt to the network state. As the latency increases, TCP's 
rate increase becomes slower, and the traffic pattern becomes more bursty in nature. These two factors 
combine to reduce the efficiency of the protocol and hence the efficiency of the network to carry 
data."

Thanks for any ideas about what will break for the terrestrial clients
if we change our web server's TCP window size to accomodate the satellite
clients.

Jim

> > Hi everyone,
> >
> > We have a very low bandwidth, very high latency TCP/IP connection
> > that we're trying to optimize.  Is there a downside to using large
> > TCP windows on an Important web server, when only a few of the clients
> > are on high latency connections and most clients are on low latency
> > connections?
> >
> > In other words, if we change the window sizes on our Important web
> > server, what will (or could) break?
> >
> > The Layer 2 is a 4800 baud MSAT satellite dialup to the PSTN and our
> > own terminal server (with an analog modem) using Linux pppd on both
> > ends.  The TCP connection is an SSL request to an apache web server,
> > using the Perl Net::SSL libraries via LWP::UserAgent and possibly
> > HTTP::Request.
> >
> > Here's a diagram:
> >
> > Client <-RS232-> MSAT satmodem <-> PSTN <-> terminal server <-> SSL web
> > server
> > PPP CLIENT <------------------------------> PPP SERVER
> > TCP CLIENT <------------------------------------------------->  TCP SERVER
> >
> > The client, terminal server, and SSL web server are all Linux of
> > varying flavors.
> >
> > Anyway it appears that if we can make the TCP socket from the remote
> > to the server using large TCP windows, the connection is more reliable
> > (less likely to time out) and faster (data moves more quickly overall).
> > I think this is due to the well known TCP ACK issue on high latency
> > networks.
> >
> > I'm tuning the kernel TCP as follows:
> >
> > echo "4096 131072 131072" > /proc/sys/net/ipv4/tcp_wmem
> >
> > We've tried changing the tcp_rmem to some small value but it doesn't
> > seem to make too much of a difference.
> >
> > I know the window size should be a multiple of the MTU (576) but I'm
> > not sure exactly how to do the calculation.  Round trip ping times are
> > 1700 to 1900ms.  Small MTUs mean that less data has to be resent if
> > a TCP retransmit is necessary; a 1500 byte MTU is a really huge
> > packet on a 4800 baud connection.
> >
> > Anyway the Important web server shall remain unchanged unless I can
> > provide some proof that Nothing Bad Will Happen if we change its TCP
> > window sizes.
> >
> > Thanks for any advice or clues,
> > Jim
> >
> > --
> > Jim Ockers, P.Eng. (ockers at ockers.net)
> > Contact info: please see http://www.ockers.net/
> > _______________________________________________
> > CLUE-tech mailing list
> > CLUE-tech at clue.denver.co.us
> > http://clue.denver.co.us/mailman/listinfo/clue-tech
> >
> 
> 
> _______________________________________________
> CLUE-tech mailing list
> CLUE-tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech
> 


-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list