From owner-freebsd-stable@FreeBSD.ORG Thu Jan 6 22:38:57 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC22C16A4CE for ; Thu, 6 Jan 2005 22:38:57 +0000 (GMT) Received: from stephanie.unixdaemons.com (stephanie.unixdaemons.com [67.18.111.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2722C43D46 for ; Thu, 6 Jan 2005 22:38:57 +0000 (GMT) (envelope-from bmilekic@technokratis.com) Received: from stephanie.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1])j06McsSu097625; Thu, 6 Jan 2005 17:38:54 -0500 (EST) Received: (from bmilekic@localhost) by stephanie.unixdaemons.com (8.13.2/8.12.1/Submit) id j06McsKU097624; Thu, 6 Jan 2005 17:38:54 -0500 (EST) (envelope-from bmilekic@technokratis.com) X-Authentication-Warning: stephanie.unixdaemons.com: bmilekic set sender to bmilekic@technokratis.com using -f Date: Thu, 6 Jan 2005 17:38:54 -0500 From: Bosko Milekic To: Chris Message-ID: <20050106223854.GA97444@technokratis.com> References: <3aaaa3a0501060612502ce616@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <3aaaa3a0501060612502ce616@mail.gmail.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-stable@freebsd.org Subject: Re: mbufs on 5.3-STABLE possible bug X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2005 22:38:57 -0000 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Please try the attached patch. It's not exactly perfect but it might solve your problem. Let me know. -Bosko On Thu, Jan 06, 2005 at 02:12:33PM +0000, Chris wrote: > Hi > > After reading the release notes and upgrading my server's I had set > the following in my /boot/loader.conf. > > kern.ipc.nmbclusters="0" > > This is supposed to make the limit to unlimited as I understood from > the docs, but a user on one of my server's reported slow download > speeds he was testing with wget and fetch, so we compared with another > FreeBSD server (5.2.1) on the same network and sure enough there was a > massive difference (45mbit on the other server 5mbit on mine), I spent > ages checking all my tweaks and changes I made comparing between the 2 > server's and ended up checking my loader.conf and tried setting a > value and leaving it as auto, both of these changes fixed the download > speed issue but setting to "0" introduces the problem. > > Has anyone else noticed this? > > Chris > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- Bosko Milekic bmilekic@technokratis.com bmilekic@FreeBSD.org --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nmbclusters.diff" Index: src/sys/kern/kern_mbuf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_mbuf.c,v retrieving revision 1.4 diff -u -r1.4 kern_mbuf.c --- src/sys/kern/kern_mbuf.c 20 Sep 2004 08:52:04 -0000 1.4 +++ src/sys/kern/kern_mbuf.c 6 Jan 2005 22:37:34 -0000 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 + * Copyright (c) 2004, 2005 * Bosko Milekic . * All rights reserved. * @@ -85,13 +85,16 @@ int nmbclusters; struct mbstat mbstat; +static int nmbclusters2; + static void tunable_mbinit(void *dummy) { /* This has to be done before VM init. */ nmbclusters = 1024 + maxusers * 64; - TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); + nmbclusters2 = nmbclusters; + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters2); } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL); @@ -141,8 +144,8 @@ NULL, NULL, MSIZE - 1, UMA_ZONE_MAXBUCKET); zone_clust = uma_zcreate("MbufClust", MCLBYTES, mb_ctor_clust, mb_dtor_clust, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_REFCNT); - if (nmbclusters > 0) - uma_zone_set_max(zone_clust, nmbclusters); + if (nmbclusters2 > 0) + uma_zone_set_max(zone_clust, nmbclusters2); zone_pack = uma_zsecond_create("Packet", mb_ctor_pack, mb_dtor_pack, mb_init_pack, mb_fini_pack, zone_mbuf); --XsQoSWH+UP9D9v3l--