Subject: Re: Increasing NBUF and BUFPAGES beyond 1/2 of the kernel map
To: Brian Buhrow <buhrow@cats.ucsc.edu>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 04/06/1998 23:15:19
> of memory.)  My calculations show that this is about 15360 pages, so I set
> NBUF=15360 and BUFPAGES=15360 in my kernel config and rebooted.
> Kmem_suballoc() returns KERN_NO_SPACE when the machine reboots on this new
> kernel and that's all she wrote for that kernel.  After further
> investigation, it appears that setting BUFPAGES and NBUF beyond 3072, half
> of the available kernel map will always cause  a panic.  What do I need to
> do to get the buffer cache beyond 12MB or so?

You're running out of kernel virtual addresses. Remember that, if
nbuf==bufpages, chunks of MAXBSIZE virtual addresses are allocated
for each buffer.

You can tweak the nbuf/bufpages ratio to populate each buffer with
more than one physical page initially. But, increasing this ratio 
also increases the risk of "internal fragmentation" especially
when dealing with many small files.

-pk