From owner-freebsd-net@FreeBSD.ORG Sun Jan 18 23:12:15 2004 Return-Path: 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 9769016A4CE for ; Sun, 18 Jan 2004 23:12:15 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id E439443D1F for ; Sun, 18 Jan 2004 23:12:10 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 59749 invoked from network); 19 Jan 2004 07:12:09 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 19 Jan 2004 07:12:09 -0000 X-pair-Authenticated: 209.68.2.70 Date: Mon, 19 Jan 2004 01:12:08 -0600 (CST) From: Mike Silbersack To: CHOI Junho In-Reply-To: <20040119.153452.10362034.cjh@kr.FreeBSD.org> Message-ID: <20040119010832.E85911@odysseus.silby.com> References: <20040119.153452.10362034.cjh@kr.FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org cc: freebsd-performance@freebsd.org Subject: Re: mbuf tuning X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2004 07:12:15 -0000 On Mon, 19 Jan 2004, CHOI Junho wrote: > Hi, > > What is general guidelines of mbuf cluster tunables? I usually use There are no good guidelines other than "don't set it too high." Andre and I have talked about some ideas on how to make mbuf usage more dynamic, I think that he has something in the works. But at present, once you hit the wall, that's it. One way to reduce mbuf cluster usage is to use sendfile where possible. Data sent via sendfile does not use mbuf clusters, and is more memory efficient. If you run 5.2 or above, it's *much* more memory efficient, due to change Alan Cox recently made. Apache 2 will use sendfile by default, so if you're running apache 1, that may be one reason for an upgrade. > Increasing kern.ipc.nmbclusters caused frequent kernel panic > under 4.7/4.8/4.9. How can I set more nmbclusters value with 64K tcp > buffers? Or is any dependency for mbufclusters value? (e.g. RAM size, > kern.maxusers value or etc) > > p.s. RAM is 2G, Xeon 2.0G x 1 or 2 machines. You probably need to bump up KVA_PAGES to fit in all the extra mbuf clusters you're allocating. Mike "Silby" Silbersack