From owner-freebsd-hackers Wed Jul 25 11:15:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id B23B837B403 for ; Wed, 25 Jul 2001 11:15:54 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA05164; Wed, 25 Jul 2001 13:05:05 -0700 (PDT) Date: Wed, 25 Jul 2001 13:05:05 -0700 (PDT) From: Julian Elischer To: Zhihui Zhang Cc: Terry Lambert , vishwanath pargaonkar , freebsd-hackers@FreeBSD.ORG Subject: Re: cluster size In-Reply-To: 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 Basically you want it to hold a number of mbufs and you want it to fit into a page nicely. you probably want it to have a bit of extra rume for oversized packets too. 2K seems a good fit. nothing magic about it however. (should be less than a page, bigget than an ehternet packet(plus a bit) 4096/3 is 1365.... too small 4096/2=2048 ok.. 4096/1 too wasteful. On Wed, 25 Jul 2001, 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 > > > 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