Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2001 13:05:05 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        Terry Lambert <tlambert2@mindspring.com>, vishwanath pargaonkar <vishubp@yahoo.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: cluster size
Message-ID:  <Pine.BSF.4.21.0107251301540.4973-100000@InterJet.elischer.org>
In-Reply-To: <Pine.SOL.4.21.0107251350010.20991-100000@opal>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107251301540.4973-100000>