From owner-freebsd-net Tue Oct 26 7:53:56 1999 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1D36514A2C for ; Tue, 26 Oct 1999 07:53:49 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id KAA82743; Tue, 26 Oct 1999 10:53:47 -0400 (EDT) (envelope-from wollman) Date: Tue, 26 Oct 1999 10:53:47 -0400 (EDT) From: Garrett Wollman Message-Id: <199910261453.KAA82743@khavrinen.lcs.mit.edu> To: David Przybylak Cc: freebsd-net@FreeBSD.ORG Subject: Window scale option In-Reply-To: References: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < 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 (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 (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