From owner-freebsd-questions@FreeBSD.ORG Sun Feb 27 15:38:51 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9902016A4CE; Sun, 27 Feb 2005 15:38:51 +0000 (GMT) Received: from mehl.gfz-potsdam.de (mehl.gfz-potsdam.de [139.17.1.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92D5443D5F; Sun, 27 Feb 2005 15:38:50 +0000 (GMT) (envelope-from ohartman@uni-mainz.de) Received: from nfw1.gfz-potsdam.de (virscan [139.17.1.10]) by mehl.gfz-potsdam.de (8.13.1/8.13.1) with SMTP id j1RFcZFt008973; Sun, 27 Feb 2005 16:38:39 +0100 (CET) Received: from ([139.17.145.116]) by nfw1; Sun, 27 Feb 2005 16:38:29 +0100 (CET) Message-ID: <4221E975.8090202@uni-mainz.de> Date: Sun, 27 Feb 2005 16:38:29 +0100 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040113 X-Accept-Language: de-de MIME-Version: 1.0 To: "David G. Lawrence" References: <4221C943.8080500@uni-mainz.de> <20050227141523.GG3258@opteron.dglawrence.com> In-Reply-To: <20050227141523.GG3258@opteron.dglawrence.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: Kernel/Userland Mem-Space Tuning (1/3 on IA32) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 15:38:51 -0000 David G. Lawrence wrote: >>Hello. >>I read about address space division of recent operating systems like >>Linux and Windows XP. >>In both cases, the whole address space of the 32 or 64 Bit system is >>divided into halfes, 2GB for >>kernel, 2 GB for process(es) (speaking in 32Bit words). The same in >>64bit systems like AMD64. >>Those who happily utilize an AMD64 based machine are not (yet) involved >>by this problem, >>but on recent 32 Bit architectures someone can run out of process space, >>like me! Some >>geophysical modelling software needs more than the allowed 2GB address >>space and therefore >>I would like to ask whether FreeBSD (my preferred OS) has a 'knob' to >>change the kernel/userland parity >>of the address space like it is done in Windows with a special knob at >>boot time (/W3GB I think, but I'm not >>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). > >-DG > >David G. Lawrence >President >Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 >TeraSolutions, Inc. - http://www.terasolutions.com - (888) 346 7175 >The FreeBSD Project - http://www.freebsd.org >Pave the road of life with opportunities. > > 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 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. 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 ... Thanks Oliver