Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jun 2001 08:52:00 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        so@server.i-clue.de
Cc:        Peter Kok <stellayu@ca.inter.net>, "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: TCP windows size 
Message-ID:  <200106281552.f5SFq0c24508@ptavv.es.net>
In-Reply-To: Your message of "Tue, 26 Jun 2001 17:28:59 %2B0200." <3B38AA3B.FC131E95@i-clue.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Tue, 26 Jun 2001 17:28:59 +0200
> From: Christoph Sold <so@server.i-clue.de>
> Sender: owner-freebsd-questions@FreeBSD.ORG
> 
> 
> 
> Peter Kok schrieb:
> > 
> > What is the advantage or disadvantage of increase the TCP window size?
> 
> The TCP window size is adjusted dynamically during the transmission for
> line quality and speed. Changing its parameters will only affect initial
> data transfer.

Unless there is new code in the TCP stack this is a bit misleading.
The available window size does change constantly during a transfer,
but TCP negotiates a maximum window size during the start of the
transfer. Changing these parameters will impact performance
significantly.

> > Does it increase the speed only?
> 
> It does neither increase nor decrease speed, it just changes the way how
> TCP handshake is handled.

Actually, many papers have been written on how window size impacts
performance. A small maximum window absolutely limits the maximum
bandwidth of session. The equation is in Stevens and is quite simple.

Bandwidth = window size / round trip time. This is a maximum bandwidth
regardless of other issues such as loss and congestion. Bandwidth is
in bits/sec, window size is in bits (not bytes!) and RTT is in
seconds. Since I almost always run on  a fast link (2 to 10 Mbps), I
always run my max window at 64K bytes.

Conversely, for slow and/or lossy links, large window sizes and hurt
performance as the stack may have trouble effectively adapting to
slow link with slow link without dropping into slow-start repeatedly.

>  
> > and how does increate the TCP window size on freebsd?
> 
> You don't. Changing the TCP window size will happen automatically.

You can adjust the maximum widow size with sysctl. The parameters you
want are net.inet.tcp.sendspace and net.inet.tcp.recvspace. If you
understand your network configuration and you are not doing dial-up,
you probably want to increase these. You also probably want to bump
net.inet.tcp.mssdflt to 1460 if you use an Ethernet connection. (But
leave it alone if you are not sure that this is safe or you use a
dial-up.) 

> P.S: To learn more about TCP/IP, read the bible: W. Richard Stevens:
> TCP/IP Illustrated Vol 1: The Protocols

Absolutely! This is THE reference used by most network engineers I
know. Richard Stevens explained things with great clarity and his
untimely passing was a huge loss to the community.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106281552.f5SFq0c24508>