Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 17:26:33 +0300 (MSK)
From:      Varshavchick Alexander <alex@metrocom.ru>
To:        David Schultz <dschultz@uclink.Berkeley.EDU>
Cc:        Terry Lambert <tlambert2@mindspring.com>, <freebsd-questions@FreeBSD.ORG>, <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: maxusers and random system freezes
Message-ID:  <Pine.GSO.4.33.0212051658380.7912-100000@apache.metrocom.ru>
In-Reply-To: <20021205135319.GA12456@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, 5 Dec 2002, David Schultz wrote:

> In FreeBSD, each process has a unique 4G virtual address space
> associated with it.  Not every virtual page in every address space
> has to be associated with real memory.  Most pages can be pushed
> out to disk when there isn't enough free RAM, and unallocated
> parts of the virtual address space aren't backed by anything.
> (Referencing an unmapped page that the system doesn't know about
> generally causes the program or OS to crash.  You've probably seen
> these as ``segmentation faults'' and ``page fault in kernel mode''
> panics.)
>
> To simplify things, the kernel is mapped into a fixed location in
> every address space.  The KVA parameter controls how big a chunk
> the kernel gets; the remainder goes to user processes.  However,
> only the part of the KVA reservation that the kernel actually uses
> is wired to physical memory.  For example, if you have a 1 GB KVA
> reservation and the kernel allocates only 20 MB of RAM, then only
> 20 MB of RAM is needed (plus some epsilon if you want to be
> picky), but in theory, the kernel could allocate and manage up to
> 1 GB of data.  You don't lose extra physical memory for increasing
> KVA, but a large KVA size does constrain the virtual address space
> available to user processes.
>

Thank you David for such an excellent explanation. So if sysctl reports

vm.zone_kmem_pages: 5413
vm.zone_kmem_kvaspace: 218808320
vm.kvm_size: 1065353216
vm.kvm_free: 58720256

does it mean that total KVA reservation is 1065353216 bytes (1G) and
almost all of it is really mapped to physical memory because only 58720256
(56M) is free, and the server is balancing on the edge of crashing with
KVA going out?

----
Alexander Varshavchick, Metrocom Joint Stock Company
Phone: (812)118-3322, 118-3115(fax)



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.33.0212051658380.7912-100000>