Subject: Re: Increasing NBUF and BUFPAGES beyond 1/2 of the kernel map
To: Brian Buhrow <buhrow@cats.ucsc.edu>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sparc
Date: 04/06/1998 04:15:56
On Apr 6, Brian Buhrow wrote
> 	OK.  But I'm not sure how to tweak the ratio.  Is nbuf the number of
> logical buffers while bufpages represents the number of pages for each
> buffer?  If bufpages==nbuf, then does that mean that MAXBSIZE pages are
> allocated to each logical buffer?

If I understood it correctly, bufpages is the number of pages (i.e. the
amount of memory) allocated to the disk cache. nbuf is the numbers of
buffers headers allocated (i.e. the max number of buffers that can exist
at the same time). When a buffer is needed, a buffer header and as much pages
as needed are allocated. So in the general case several pages are allocated
for each used buffer headers. For example, on a FFS created with standarts
options, the block size is 8k, so each used buffer headers allocated for I/O
on this FS will have 8k of memory allocated (that is, 1 or 2 pages, depending
on the architecture you are running on).

PS: I didn't read the code, so I may be wrong. 

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--