From owner-freebsd-hackers Wed Jul 25 11:18: 1 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 49A3B37B403 for ; Wed, 25 Jul 2001 11:17:55 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from opal (cs.binghamton.edu [128.226.123.101]) by bingnet2.cc.binghamton.edu (8.11.4/8.11.4) with ESMTP id f6PIHpu24714; Wed, 25 Jul 2001 14:17:51 -0400 (EDT) Date: Wed, 25 Jul 2001 14:17:38 -0400 (EDT) From: Zhihui Zhang X-Sender: zzhang@opal To: Bosko Milekic Cc: Terry Lambert , vishwanath pargaonkar , freebsd-hackers@FreeBSD.ORG Subject: Re: cluster size In-Reply-To: <20010725140737.A25132@technokratis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I see. It has something to do with the power-of-two allocator we are using inside the kernel. -Zhihui On Wed, 25 Jul 2001, Bosko Milekic wrote: > > On Wed, Jul 25, 2001 at 01:51:51PM -0400, Zhihui Zhang wrote: > > > > > > On Tue, 24 Jul 2001, Terry Lambert wrote: > > > > > Zhihui Zhang wrote: > > > > > Hi, > > > > > in freebsd can we change the cluster size from 2048 > > > > > bytes.If yes how can we do that? > > > > > do we have to configure in some file? > > > > > > > > You must be asking why the mbuf cluster size is chosen as 2048, right? It > > > > is probably a tradeoff between memory efficient and speed. > > > > > > Ask yourselves: > > > > > > "What is the minimum cluster size I would have to have > > > to be able to contain the maximum MTU worth of data, > > > yet remain an even multiple of sizeof(mbuf) -- 256 > > > bytes?" > > > > A dumb question: why even not odd multiple? > > > > -Zhihui > > It actually has to do with the fact that 2K is the only size equal to > or greater than the maximum MTU worth of data that can be multiplied to a page > size without any leftover (in other words, page size modulo 2K is zero). > > -- > Bosko Milekic > bmilekic@technokratis.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message