From owner-freebsd-current@FreeBSD.ORG Thu Jul 24 23:09:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB12D37B401 for ; Thu, 24 Jul 2003 23:09:45 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CDB643F85 for ; Thu, 24 Jul 2003 23:09:45 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfi6b.dialup.mindspring.com ([165.247.200.203] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19fvlv-000509-00; Thu, 24 Jul 2003 23:09:44 -0700 Message-ID: <3F20C969.CA63E3C5@mindspring.com> Date: Thu, 24 Jul 2003 23:08:41 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Stephane Raimbault References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4885cd7e6f429bfe4e58e0cdce3ab7927666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: current@freebsd.org Subject: Re: FreeBSD 5.1-R kernel panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 06:09:46 -0000 Stephane Raimbault wrote: > I recently realized that I was miss-understanding how much free memory I had > on the system, and I doubt I even need the full 4Gig's. > > Perhaps I can re-confirm how to check how much free real memory is available > on the system. For 4G of physical RAM, with 3G of KVA and 1G of UVA, you have enough memory to hold the kernel and the page mappings for all of KVA + the pages dedicated to the kernel, plust the defaults for buffers (if you *do not* autotune) for ~2G of mbufs and tuning for approximately 280,000 socket connections and open files, *IF* you disable IPSEC, AND you intend to run one or two processes in user space and use mode of the 1G of address space there. If you autotune, the numbers of connections you can run drops sharply. Also note that the default UVA/KVA plist is *not* 1G/3G, it's 2G/2G, and it used to be 3G/1G. For 4G server systems, the very first thing I always recommend, if you want the highest load capacity possible, is to reduce the UVA and increse the KVA so you have enough space in the KVA to map and store the resources you'll need for a high load. The most common thing to run out of, in everything but database servers, is KVA space ("panic: kmem_map too small"). For databases with large data sets, you have to artificially restrict the amount of total KVA that everything added together can consume to keep it under the 2G ceiling. This usually means a tradeoff between number of connections and database size. -- Terry