Subject: Re: Virtual Memory Issues on 2.0
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 01/12/2005 02:48:56
[ On Tuesday, January 11, 2005 at 19:40:33 (+0100), Manuel Bouyer wrote: ]
> Subject: Re: Virtual Memory Issues on 2.0
>
> Most likely you're running out of kmem_map entries. Check the current value
> with "sysctl vm.nkmempages" and recompile a kernel with
>
> options NKMEMPAGES=<some highter value>
>
> I run with 6144 on a dual-CPU ss10, and this seems to be enouth.
Earlier in another thread you said 6095.
But they're both very "odd" numbers. How did you choose them?
Of course my 1.6.1 desktop system (an SS20 with 128MB RAM) has a an odd
number too:
$ /sbin/sysctl vm.nkmempages
vm.nkmempages = 8146
However my mail server (also an SS20, also still running ~1.6.1, but
with 320MB RAM) has a rather even looking number:
# /sbin/sysctl vm.nkmempages
vm.nkmempages = 8192
Both those 1.6.1 systems were compiled with:
options NKMEMPAGES_MAX="((32 * 1024 * 1024) >> PAGE_SHIFT)"
(note the _MAX part.... that seems to be a more sensible adjustment to
me, given the default min/max limits, and if one wants the system to
continue to auto-tune itself to available resources as best as it knows
how)
(and of course my big system's vm.nkmempages=8192 makes sense with that)
I also have added the following comments to my netbsd-1-6 config files:
## The related options `NKMEMPAGES_MIN' and `NKMEMPAGES_MAX' allow the
## bounds to be overridden. These options are provided in the event
## the computed value is insufficient resulting in an ``out of space
## in kmem_map'' panic.
##
## On Sparc KMEMPAGES_MAX (and NKMEMPAGES) must be less than 57344.
##
## XXX no, that's not true (any more?) 96mb (24576) fails to boot,
## and 64mb hangs during dev_mkdb.
##
## XXX There should also be an option to change the 1/4 physmem factor
## for npages instead of having to hard-code NKMEMPAGES in a custom
## kernel! What if I want
The default 6MB limit in netbsd-1-6 though is, I think, _way_ too low:
#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
Maybe it would also makes sense to be able to change KERNBASE and
KERNEND for custom kernels for more capable systems? Or is that simply
not possible? (given my rudimentary understanding of this level in
kernel memory management they seem to be what causes the boot failures
mentioned above)
--
Greg A. Woods
H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>