Subject: Re: LFS performance and kern.maxvnodes
To: Blair Sadewitz <blair.sadewitz@gmail.com>
From: David Holland <dholland+netbsd@eecs.harvard.edu>
List: tech-perform
Date: 09/11/2007 21:01:09
On Mon, Sep 10, 2007 at 09:54:35PM -0400, Blair Sadewitz wrote:
 > Another thing I was going to propose was setting sysctl.conf defaults
 > from sysinst using basic heuristics, taking into account [at least]
 > the amount of system memory and anticipated workload.
 > We could then use this information to help suggest more intelligent
 > defaults for things such as base filesystem layout and bsize/fsize,
 > etc.

I'm not going to say this is a bad idea - but in this case wouldn't it
be better to make the kernel default smarter? Then you don't have
wired-down values in /etc that go out of date when the hardware gets
rearranged.

There's already code in init_main.c that checks the default
MAXUSERS-based value for being too low and substitutes "1% of memory"
(based on the size of struct vnode), resulting in 62.4 vnodes per
megabyte. With the default MAXUSERS of 32 this kicks in when you have
over 12 megabytes of RAM. It wouldn't be difficult to pump this up
more for larger memory sizes.

-- 
   - David A. Holland / dholland@eecs.harvard.edu