From owner-freebsd-hackers Thu Dec 5 5:53:24 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AF9537B404; Thu, 5 Dec 2002 05:53:22 -0800 (PST) Received: from HAL9000.homeunix.com (12-232-220-15.client.attbi.com [12.232.220.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75F0D43E4A; Thu, 5 Dec 2002 05:53:21 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id gB5DrKJt012541; Thu, 5 Dec 2002 05:53:20 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id gB5DrJuD012540; Thu, 5 Dec 2002 05:53:19 -0800 (PST) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Thu, 5 Dec 2002 05:53:19 -0800 From: David Schultz To: Varshavchick Alexander Cc: Terry Lambert , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: maxusers and random system freezes Message-ID: <20021205135319.GA12456@HAL9000.homeunix.com> Mail-Followup-To: Varshavchick Alexander , Terry Lambert , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG References: <3DEF2573.D8C66C11@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Varshavchick Alexander : > A question arises. The value 256 (1G KVA space) acts as a default for any > system installation, not depending of real phisical memory size. So for > any server with RAM less than 2G (which is a majority I presume) the KVA > space occupies more than half of physical memory. It can even be more than > TOTAL phisical memory for servers with RAM less than 1G. Isn't it bad for > a system? It seems that it is not. Then why cannot the KVA space always be > made as some big value? If it is important for servers with large RAM, why > it is not or a smaller servers? 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message