Re: Tuning KVA_PAGES / kmem?

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Tue, 20 Apr 2004 21:22:33 +0300
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...


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Tue Apr 20 2004 - 09:22:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:51 UTC