From owner-freebsd-net@FreeBSD.ORG Thu Dec 14 10:49:33 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FA1916A403 for ; Thu, 14 Dec 2006 10:49:33 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF98D43CA7 for ; Thu, 14 Dec 2006 10:47:57 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 81924 invoked from network); 14 Dec 2006 10:36:39 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Dec 2006 10:36:39 -0000 Message-ID: <45812C3F.2060902@freebsd.org> Date: Thu, 14 Dec 2006 11:49:35 +0100 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: =?GB2312?B?zfXP/rar?= References: <366084723.18343@hhu.edu.cn> In-Reply-To: <366084723.18343@hhu.edu.cn> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Cc: freebsd-net@freebsd.org Subject: Re: Automatic TCP send and receive socket buffer sizing X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 10:49:33 -0000 ÍõÏþ¶« wrote: > I have applied the patch of automatic send buffer sizing. > My log file is: > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 33304, new 41496, sb_cc 30328, snd_wnd 65160, sendwnd 20308 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 41496, new 49688, sb_cc 39680, snd_wnd 66608, sendwnd 20272 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 49688, new 57880, sb_cc 46840, snd_wnd 65160, sendwnd 24616 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 57880, new 66072, sb_cc 54536, snd_wnd 65160, sendwnd 30408 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 66072, new 74264, sb_cc 63848, snd_wnd 65160, sendwnd 33304 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 74264, new 82456, sb_cc 71544, snd_wnd 65160, sendwnd 39096 > Dec 13 21:54:25 FreeBSD kernel: tcp_output: 202.119.117.246 inc sockbuf, old > 82456, new 90648, sb_cc 73944, snd_wnd 66608, sendwnd 43440 > Dec 13 21:55:58 FreeBSD kernel: tcp_output: 202.119.117.245 inc sockbuf, old > 33304, new 41496, sb_cc 29818, snd_wnd 64128, sendwnd 15461 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 33580, new 41772, sb_cc 31672, snd_wnd 65535, sendwnd 17520 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 41772, new 49964, sb_cc 37592, snd_wnd 65535, sendwnd 21900 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 49964, new 58156, sb_cc 44324, snd_wnd 65535, sendwnd 23360 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 58156, new 66348, sb_cc 53408, snd_wnd 65535, sendwnd 27740 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 66348, new 74540, sb_cc 62492, snd_wnd 65535, sendwnd 32120 > Dec 13 21:58:13 FreeBSD kernel: tcp_output: 202.119.117.45 inc sockbuf, old > 74540, new 82732, sb_cc 70116, snd_wnd 65535, sendwnd 37960 > Dec 13 21:59:29 FreeBSD kernel: tcp_output: 202.119.117.245 inc sockbuf, old > 41496, new 49688, sb_cc 36934, snd_wnd 64128, sendwnd 19101 > Dec 13 21:59:29 FreeBSD kernel: tcp_output: 202.119.117.245 inc sockbuf, old > 49688, new 57880, sb_cc 44222, snd_wnd 69888, sendwnd 22976 > > And 117.45 is XP, 117.245 is Debian, 117.246 is FreeBSD-6-Stable. > > How to analyze the performance? I need a help. The log lines prove that the automatic send buffer sizing was working. On local high speed networks with very low RTT (<1ms) the effect is almost not noticeable. On links with higher bandwidth and larger RTT (>10ms Internet and Corporate WAN) there can be a very large difference. You can perform a test by transferring the same large file twice, once with auto sizing enabled and once without. A good target is the European half of FTP.FreeBSD.ORG [62.243.72.50] as it has a high bandwidth connection and the send buffer auto scaling patch installed. -- Andre