From owner-freebsd-questions@FreeBSD.ORG Mon Jun 4 10:06:29 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C72D16A400; Mon, 4 Jun 2007 10:06:29 +0000 (UTC) (envelope-from brian@Awfulhak.org) Received: from storm.uk.FreeBSD.org (storm.uk.FreeBSD.org [194.242.157.42]) by mx1.freebsd.org (Postfix) with ESMTP id E674C13C458; Mon, 4 Jun 2007 10:06:28 +0000 (UTC) (envelope-from brian@Awfulhak.org) Received: from store.lan.Awfulhak.org (store.lan.Awfulhak.org [172.16.0.35]) by storm.uk.FreeBSD.org (8.14.1/8.14.1) with ESMTP id l54A6QWr025120; Mon, 4 Jun 2007 11:06:26 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id F1B641957C76; Mon, 4 Jun 2007 10:06:22 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Postfix) with ESMTP id D97B61957C73; Mon, 4 Jun 2007 10:06:18 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.1/8.14.1) with ESMTP id l54A6IAX012518; Mon, 4 Jun 2007 03:06:18 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Mon, 4 Jun 2007 03:06:17 -0700 From: Brian Somers To: Pang Message-ID: <20070604030617.2973e3c8@dev.lan.Awfulhak.org> In-Reply-To: <465ED66F.30902@laws.ms> References: <465ED66F.30902@laws.ms> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Download speed and TCPIP window sizing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2007 10:06:29 -0000 On Thu, 31 May 2007 22:06:39 +0800 Pang wrote: > Could anyone tell me whether my understanding on Window sizing > correct? Also, is there any way to alter the window sizing in freebsd or > apache? AFAIK you can't increase the window size unless you use the tcp wscale option (it's a 2-byte value). This wasn't possible 'till recently in -current: andre 2007-02-01 17:39:19 UTC FreeBSD src repository Modified files: sys/netinet tcp_syncache.c tcp_usrreq.c Log: Change the way the advertized TCP window scaling is computed. Instead of upper-bounding it to the size of the initial socket buffer lower-bound it to the smallest MSS we accept. Ideally we'd use the actual MSS information here but it is not available yet. For socket buffer auto sizing to be effective we need room to grow the receive window. The window scale shift is determined at connection setup and can't be changed afterwards. The previous, original, method effectively just did a power of two roundup of the socket buffer size at connection setup severely limiting the headroom for larger socket buffers. Tested by: many (as part of the socket buffer auto sizing patch) MFC after: 1 month Revision Changes Path 1.104 +8 -2 src/sys/netinet/tcp_syncache.c 1.143 +7 -2 src/sys/netinet/tcp_usrreq.c This may not be MFC'd (I think I'd object if it was) as there are several old OpenBSD/pf setups that have issues with wscale > 4. Hopefully these setups will be fixed by the time 7.0 is released, as windows/vista and linux/debian now set wscale > 4 too. The patch is pretty small though, so you may want to try applying it to your box to see if it helps. HTH. -- Brian Somers Don't _EVER_ lose your sense of humour !