Date: Sun, 27 Feb 2005 17:02:26 +0100 From: "O. Hartmann" <ohartman@uni-mainz.de> To: "David G. Lawrence" <dg@dglawrence.com> Cc: freebsd-amd64@freebsd.org Subject: Re: Kernel/Userland Mem-Space Tuning (1/3 on IA32) Message-ID: <4221EF12.6020301@uni-mainz.de> In-Reply-To: <20050227154600.GI3258@opteron.dglawrence.com> References: <4221C943.8080500@uni-mainz.de> <20050227141523.GG3258@opteron.dglawrence.com> <4221E975.8090202@uni-mainz.de> <20050227154600.GI3258@opteron.dglawrence.com>
next in thread | previous in thread | raw e-mail | index | archive | help
David G. Lawrence wrote: >>>>sure about the exakt syntax but I know someone can change the half by >>>>half parity towards 1 to 3 in >>>>XP). I'm not sure whether FreeBSD divides kernel/userland address space >>>>this way, I know Linux and >>>>Windows does and on Windows we changed this (not yet on Linux and not >>>>yet on our FreeBSD machines >>>>(OS version >5.0, mostly FreeBSD 5.3-R or 5.4-PRERELEASE). >>>> >>>>Any help is appreciated. >>>> >>>> >>>> >>>> >>> FreeBSD divides the 32bit virtual address space with 1GB for the kernel >>>and 3GB for user processes. This can be changed with some kernel compile- >>>time constants (primarily KVA_PAGES, however NKPT may also need to be >>>increased if the kernel address space is increased). >>> >>> >... > > >>Dear David. >>Thank you very much. >>I assumed FreeBSD do the same like Linux, but don't obviously. >> >>I found a lot of tweaking kernel parameters, >>KVA_PAGES >>VM_KMEM_SIZE_SCALE >>VM_KMEM_SIZE_MAX >>VM_KMEM_SIZE >> >> > > The last three are not related to the address space division and you >should not change those under normal circumstance. > > > >>Reading some comments in sys/kern/kern_malloc.c make be a bit confused, >>I do not know much about kernel's interna. >> >>It is nice to hear that FreeBSD do a 1/3 division, I expected a 2/2 >>division like Linux does. So no need for anything changing. >> >> > > It's a 1:4 ratio. > > Sorry, I meant 1GB kernel, 3GB userland or 2GB kernel, 2GB userland, not the divisor or mathematical ratio, sorry for this unprecise. > > > >>Can someone please explain NKPT? I'm simply curious, didn't found a >>satisfying answer via google, but a lot of source code with this in ... >> >> > > It's the number of page table pages that are assigned to the kernel >address space. Each page maps 4MB, so 256 (the default) provides for >1GB of kernel virtual address space, leaving 3GB for user space. > > Many thanks, that helped a lot! Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4221EF12.6020301>