kmem_map too small

Kris Kennaway kris at FreeBSD.org
Fri Nov 16 00:54:19 PST 2007


Andrew Kolchoogin wrote:
> В Пт, 16/11/2007 в 09:16 +0100, Kris Kennaway пишет:
> 
>> Check the archives, this comes up a lot (you need to increase the amount 
>> of memory allocated to the kernel).
>     Already did.
> 
>     The question actually is how much memory I should allocate for
> kernel (exactly, what numbers should be placed into /boot/loader.conf in
> vm.kmem_size and vm.kmem_size_max) and what amount of kernel memory
> depends on and how I could calculate kernel memory needs.
> 
>     Trivial answer "just try to experiment" is not definitely enough. :)
> 
> First of all, this process can be _extremely_ lengthy: about two months
> ago I have tried to "brute force" guess vm.kmem* values to start using
> ZFS on my desktop at work: two weeks for testing is very large amount of
> time, and, as said by Dijkstra, "testing can only show us presence of
> bugs, and not their absence": "cvs -z 5 -g up -P -d" done in /usr/ports
> (very good test to crash your machine if you're using ZFS because of
> heavy usage of ZFS POSIX name resolution cache) stopped crashing my box,
> but I can't say that any other test will not crash it.
> 
> Second, the machine in question operates unattended, and our technical
> support engineers are not qualified enough to tweak boot loader
> parameters, as such, I should constantly monitor this server what I
> don't wish to do. :)

There is no general answer to that question since the amount of memory 
your system needs to use entirely depends on what you are doing with it.

Increase the size by some percentage, e.g. 10% or 20%, and see if that 
is sufficient.

Kris


More information about the freebsd-stable mailing list