Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 1999 10:53:47 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        David Przybylak <em8david@etek.chalmers.se>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Window scale option
Message-ID:  <199910261453.KAA82743@khavrinen.lcs.mit.edu>
In-Reply-To: <Pine.OSF.3.96.991026160021.13716B-100000@quarl0>
References:  <Pine.OSF.3.96.991026160021.13716B-100000@quarl0>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 26 Oct 1999 16:19:23 +0200 (MET DST), David Przybylak <em8david@etek.chalmers.se> said:

> Does anyone understand what the problem is? How can I use the window
> scale option? How can I send window advertisements up to 264144 bytes
> (which is the maximum value fixed by the sysctl MIB variable
>  "kern.ipc.maxsockbuf")?

You can't actually set them that high using the default maxsockbuf
because TCP will round the window up to a whole number of segments.
On my 4.0-current system:

root@khavrinen(1)# sysctl -w net.inet.tcp.rfc1323=1
net.inet.tcp.rfc1323: 0 -> 1
root@khavrinen(4)# sysctl -w kern.ipc.maxsockbuf=524288
kern.ipc.maxsockbuf: 262144 -> 524288
root@khavrinen(5)# tcpdump -i lo0 -w /tmp/foo -s 128 tcp port 5001
tcpdump: listening on lo0
^C
2074 packets received by filter
0 packets dropped by kernel
root@khavrinen(6)# tcpdump -r /tmp/foo | more
10:38:06.070868 localhost.lcs.mit.edu.udt_os > localhost.lcs.mit.edu.commplex-link: S 228218603:228218603(0) win 16384 <mss 16344,nop,wscale 0,nop,nop,timestamp 231719946 0> (DF)
10:38:06.070993 localhost.lcs.mit.edu.commplex-link > localhost.lcs.mit.edu.udt_os: S 228306224:228306224(0) ack 228218604 win 57344 <mss 16344,nop,wscale 3,nop,nop,timestamp 231719946 231719946> (DF)

On the receiving side:

wollman@khavrinen(3)$ ttcp -b 262144 -r -s -v -f m
ttcp-r: buflen=8192, nbuf=2048, align=16384/0, port=5001, sockbufsize=262144  tcp
ttcp-r: socket
ttcp-r: rcvbuf
ttcp-r: accept from 127.0.0.1
ttcp-r: 16777216 bytes in 0.52 real seconds = 246.88 Mbit/sec +++
ttcp-r: 16777216 bytes in 0.22 CPU seconds = 586.21 Mbit/cpu sec
ttcp-r: 2325 I/O calls, msec/call = 0.23, calls/sec = 4484.35
ttcp-r: 0.0user 0.2sys 0:00real 41% 128i+228d 422maxrss 0+2pf 553+236csw
ttcp-r: buffer address 0x28000

On the sending side:

wollman@khavrinen(2)$ ttcp -t -s -v -f m -b 262144 localhost
ttcp-t: buflen=8192, nbuf=2048, align=16384/0, port=5001, sockbufsize=262144  tcp  -> localhost
ttcp-t: socket
ttcp-t: sndbuf
ttcp-t: connect
ttcp-t: 16777216 bytes in 0.50 real seconds = 254.00 Mbit/sec +++
ttcp-t: 16777216 bytes in 0.22 CPU seconds = 568.96 Mbit/cpu sec
ttcp-t: 2048 I/O calls, msec/call = 0.25, calls/sec = 4064.04
ttcp-t: 0.0user 0.2sys 0:00real 42% 181i+330d 86maxrss 0+2pf 232+557csw
ttcp-t: buffer address 0x2c000

(This is on a three-year-old Pentium Pro on an Orion motherboard.  A
convenient 400-MHz Celeron-A gave about twice the speed.)

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


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




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