From owner-freebsd-net Mon Nov 4 18:40:43 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8CF937B401 for ; Mon, 4 Nov 2002 18:40:40 -0800 (PST) Received: from web10402.mail.yahoo.com (web10402.mail.yahoo.com [216.136.130.94]) by mx1.FreeBSD.org (Postfix) with SMTP id 1425443E42 for ; Mon, 4 Nov 2002 18:40:40 -0800 (PST) (envelope-from opolyakov@yahoo.com) Message-ID: <20021105024040.68335.qmail@web10402.mail.yahoo.com> Received: from [67.112.212.200] by web10402.mail.yahoo.com via HTTP; Mon, 04 Nov 2002 18:40:40 PST Date: Mon, 4 Nov 2002 18:40:40 -0800 (PST) From: Oleg Polyakov Subject: Re: RFC 3390: Increasing TCP's Initial Window To: freebsd-net@freebsd.org, Jeffrey Hsu , Lars Eggert In-Reply-To: <0H4X004T7EFMU1@mta7.pltn13.pbi.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --- Jeffrey Hsu wrote: > > Time to default net.inet.tcp.slowstart_flightsize to 4? > > A straight initial window of 4 is too big. I have patches lying around > that varies the initial window size from 2 to 4 depending on the MSS, > as specified in the RFC. > > Jeffrey We could not apply those patches until we fix a bug serverside which increments snd_cwnd with 1 mss somewhere... Server - CURRENT (source synced on Nov 02). Take a look on TCP session. There is local network and we should have initial window 4 mss. Notice how many packets it sent before first ACK came. 5 packets. 5 ck ~# sysctl net.inet.tcp.local_slowstart_flightsize net.inet.tcp.local_slowstart_flightsize: 4 6 ck ~# tcpdump port 80 tcpdump: listening on fxp0 18:57:28.854418 10.13.200.242.2356 > 10.13.200.240.http: S 2006596932:2006596932(0) win 16384 (DF) 18:57:28.854519 10.13.200.240.http > 10.13.200.242.2356: S 3851758649:3851758649(0) ack 2006596933 win 65535 (DF) 18:57:28.854698 10.13.200.242.2356 > 10.13.200.240.http: . ack 1 win 17520 (DF) 18:57:28.980517 10.13.200.242.2356 > 10.13.200.240.http: P 1:510(509) ack 1 win 17520 (DF) 18:57:28.981094 10.13.200.240.http > 10.13.200.242.2356: . 1:1461(1460) ack 510 win 65535 (DF) 18:57:28.981157 10.13.200.240.http > 10.13.200.242.2356: . 1461:2921(1460) ack 510 win 65535 (DF) 18:57:28.981216 10.13.200.240.http > 10.13.200.242.2356: . 2921:4381(1460) ack 510 win 65535 (DF) 18:57:28.981238 10.13.200.240.http > 10.13.200.242.2356: . 4381:5841(1460) ack 510 win 65535 (DF) 18:57:28.981287 10.13.200.240.http > 10.13.200.242.2356: . 5841:7301(1460) ack 510 win 65535 (DF) 18:57:28.981744 10.13.200.242.2356 > 10.13.200.240.http: . ack 2921 win 17520 (DF) 18:57:28.981822 10.13.200.240.http > 10.13.200.242.2356: FP 7301:7864(563) ack 510 win 65535 (DF) 18:57:28.981981 10.13.200.242.2356 > 10.13.200.240.http: . ack 5841 win 17520 (DF) 18:57:28.982171 10.13.200.242.2356 > 10.13.200.240.http: . ack 7865 win 17520 (DF) 18:57:29.102762 10.13.200.242.2356 > 10.13.200.240.http: F 510:510(0) ack 7865 win 17520 (DF) 18:57:29.102840 10.13.200.240.http > 10.13.200.242.2356: . ack 511 win 65535 (DF) ^C 1214 packets received by filter 0 packets dropped by kernel 7 ck ~# 7 ck ~# sysctl -w net.inet.tcp.local_slowstart_flightsize=1 net.inet.tcp.local_slowstart_flightsize: 4 -> 1 8 ck ~# tcpdump port 80 tcpdump: listening on fxp0 19:04:54.623558 10.13.200.242.2360 > 10.13.200.240.http: S 2118035397:2118035397(0) win 16384 (DF) 19:04:54.623657 10.13.200.240.http > 10.13.200.242.2360: S 1566520560:1566520560(0) ack 2118035398 win 65535 (DF) 19:04:54.623841 10.13.200.242.2360 > 10.13.200.240.http: . ack 1 win 17520 (DF) 19:04:54.767900 10.13.200.242.2360 > 10.13.200.240.http: P 1:510(509) ack 1 win 17520 (DF) 19:04:54.768484 10.13.200.240.http > 10.13.200.242.2360: . 1:1461(1460) ack 510 win 65535 (DF) 19:04:54.768545 10.13.200.240.http > 10.13.200.242.2360: . 1461:2921(1460) ack 510 win 65535 (DF) 19:04:54.769133 10.13.200.242.2360 > 10.13.200.240.http: . ack 2921 win 17520 (DF) 19:04:54.769218 10.13.200.240.http > 10.13.200.242.2360: . 2921:4381(1460) ack 510 win 65535 (DF) 19:04:54.769243 10.13.200.240.http > 10.13.200.242.2360: . 4381:5841(1460) ack 510 win 65535 (DF) 19:04:54.769267 10.13.200.240.http > 10.13.200.242.2360: . 5841:7301(1460) ack 510 win 65535 (DF) 19:04:54.769863 10.13.200.242.2360 > 10.13.200.240.http: . ack 5841 win 17520 (DF) 19:04:54.769927 10.13.200.240.http > 10.13.200.242.2360: FP 7301:7864(563) ack 510 win 65535 (DF) 19:04:54.770240 10.13.200.242.2360 > 10.13.200.240.http: . ack 7865 win 17520 (DF) 19:04:54.905359 10.13.200.242.2360 > 10.13.200.240.http: F 510:510(0) ack 7865 win 17520 (DF) 19:04:54.905438 10.13.200.240.http > 10.13.200.242.2360: . ack 511 win 65535 (DF) After I changed initial window size to 1 it started to send 2 packets before first ACK, then 3 packets before next ACK. Client side is working as supposed to. If I set net.inet.tcp.local_slowstart_flightsize to 1 it sends 1 packet before ACK. If I change it to 4 - it sends 4 packets before ACK. Please check it in your environment. I've got same results with 4.7 and 4.6 - same wrong TCP initial window. ---- Oleg __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message