From owner-freebsd-stable@FreeBSD.ORG Mon Sep 15 18:15:09 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B67616A4B3 for ; Mon, 15 Sep 2003 18:15:09 -0700 (PDT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id F09E543F75 for ; Mon, 15 Sep 2003 18:15:03 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (corp-2.ipinc.com [199.245.188.2]) by smtp-relay.omnis.com (Postfix) with ESMTP id A56D99BE4A; Mon, 15 Sep 2003 18:15:02 -0700 (PDT) From: Wes Peters Organization: Softweyr.com To: Irvine Short , Alex de Kruijff Date: Mon, 15 Sep 2003 18:15:01 -0700 User-Agent: KMail/1.5.2 References: <20030913092804.S46465@fling.sanbi.ac.za> <20030914162113.GA89177@dds.nl> <20030915070012.U36360@fling.sanbi.ac.za> In-Reply-To: <20030915070012.U36360@fling.sanbi.ac.za> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309151815.01873.wes@softweyr.com> cc: freebsd-stable@freebsd.org Subject: Re: Large memory issues on 4-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 01:15:09 -0000 On Sunday 14 September 2003 22:07, Irvine Short wrote: > > However we have a situation where if I set MAXDSIZ to 2048 or above > then things break, so FreeBSD right now has an effectivce limit of > 2GB per process. > > Is this to be considered a bug or a feature? Neither. Tuning MAXDSIZ is not for the faint of heart. I assume you have searched the mailing list archives and discovered the few gems of messages that explain precisely how you can set MAXDSIZ to roughly 3GB? I did this last summer, using 4.7-ish sources, with success, but it took a couple of days of tinkering and testing to get a configuration that worked, and it wasn't exactly 3072MB, it was more like 2940MB or so. > Then, with the PAE support, lets say I have 8GB of RAM. Will those > same design limitations restrict me to 3GB of RAM, or 2GB, or will I > be able to have a single process addressing 4GB all by itself? The kernel still has to be mapped into the process address space, so you'll get the same number you got before. The difference PAE makes is that you can have more such processes resident in memory than without. > This is relevant to the work we're doing - some of my users actually > really do need this amount of memory. As did mine. Let's see, here's one hint, found in http://docs.freebsd.org/cgi/getmsg.cgi?fetch=83003+0+archive/2002/freebsd-hackers/20020804.freebsd-hackers :I'm running into some similar issues when trying to make Squid eat as :much as possible of the 4 GB memory I have installed in a Compaq :ProLiant DL 380 G2. At first, Squid seems to die and restart when trying :to allocate memory above 512 MB. By tuning MAXDSIZ, I have made it use :up to around 2 GB. If I set MAXDSIZ (I now do it in loader.conf with :kern.maxdsiz) above around 2950 MB, init starts failing upon boot: : :init in malloc(): error mmap(2) failed, check limits :init in malloc(): warning: recursive call That's pretty close to my recollection of 2940MB. A "quick" binary search, using the loader to specify MAXDSIZ, will probably nail down just how big you can get and still remain stable. Remember to set resource limits for your users so they can actually take advantage of this once you've found out what the limit is. -- "Where am I, and what am I doing in this handbasket?" Wes Peters wes@softweyr.com