Tuning KVA_PAGES / kmem?

Ruslan Ermilov ru at FreeBSD.org
Tue Apr 20 11:22:37 PDT 2004

On Tue, Apr 20, 2004 at 05:17:31PM +0200, Stefan Bethke wrote:
> Am 20.04.2004 um 15:40 schrieb Ruslan Ermilov:
> >On Tue, Apr 20, 2004 at 01:14:52PM +0200, Stefan Bethke wrote:
> >>I dug through the archives, and I found some hints that with >>2 GB
> >>RAM, the auto-tuning might produce undesirable results, so I might 
> >>need
> >>to tune KVA_PAGES to reserve more address space for the kernel, or
> >>fiddle with VM_KMEM_SIZE_MAX, VM_KMEM_SIZE_SCALE, or some vm sysctls.
> >>
> >>Can someone point me in the right direction?
> >>
> >See sys/i386/conf/NOTES, when it talks about KVA_PAGES, for the
> >starters.
> Thanks, I already looked at that, but I'd be interested in some 
> recommendations on which values for the various tunables would be 
> better than the defaults. NOTES has this to say about KVA_PAGES:
> # Change the size of the kernel virtual address space.  Due to
> # constraints in loader(8) on i386, this must be a multiple of 4.
> # 256 = 1 GB of kernel address space.  Increasing this also causes
> # a reduction of the address space in user processes.  512 splits
> # the 4GB cpu address space in half (2GB user, 2GB kernel).
> #
> options         KVA_PAGES=260
> This neatly explains what changing the default will affect, but not 
> really what to set it to given a certain amount of physical memory.
> Certainly, there must be people running -current with 4 or 6 GB or RAM, 
> and with some advice whcih parameters work for them?
Well, take the amount of your virtual memory (physical + swap),
and decide how much of it you'd like to allocate for kernel.
It's really hard to say what how much memory you need in your
kernel, this is highly dependent on your specific requirements.
If you do a lot of malloc()'s in the kernel, for example...

Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040420/7c849294/attachment.bin

More information about the freebsd-current mailing list