Subject: Re: Increasing NBUF and BUFPAGES beyond 1/2 of the kernel map
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Brian Buhrow <buhrow@cats.ucsc.edu>
List: port-sparc
Date: 04/06/1998 16:14:44
	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?
	Is there a way to work around the fragmentation problem short of
sticking with a small buffer cache?  We're talking about a news server here,
so most of the files are small.
	Please excuse my ignorance about the relationship between nbuf and
bufpages.  It wasn't exactly clear to me in the code.
-thanks
-Brian

On Apr 6, 11:15pm, Paul Kranenburg wrote:
} Subject: Re: Increasing NBUF and BUFPAGES beyond 1/2 of the kernel map
} > 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
>-- End of excerpt from Paul Kranenburg