From owner-freebsd-stable@FreeBSD.ORG Thu Jul 24 14:50:25 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 265F337B401 for ; Thu, 24 Jul 2003 14:50:25 -0700 (PDT) Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id A235943F3F for ; Thu, 24 Jul 2003 14:50:23 -0700 (PDT) (envelope-from peter.jeremy@alcatel.com.au) Received: from sydsmtp01.alcatel.com.au (IDENT:root@localhost.localdomain [127.0.0.1])h6OLoLx3002988; Fri, 25 Jul 2003 07:50:22 +1000 Received: from gsmx07.alcatel.com.au ([139.188.20.247]) by sydsmtp01.alcatel.com.au (Lotus Domino Release 5.0.12) with ESMTP id 2003072507502085:75535 ; Fri, 25 Jul 2003 07:50:20 +1000 Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1]) by gsmx07.alcatel.com.au (8.12.9/8.12.9) with ESMTP id h6OLoK7d085859; Fri, 25 Jul 2003 07:50:20 +1000 (EST) (envelope-from peter.jeremy@alcatel.com.au) Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.12.9/8.12.9/Submit) id h6OLoKUU085858; Fri, 25 Jul 2003 07:50:20 +1000 (EST) (envelope-from peter.jeremy@alcatel.com.au) Date: Fri, 25 Jul 2003 07:50:20 +1000 From: Peter Jeremy To: Matthias Buelow Message-ID: <20030724215020.GV430@gsmx07.alcatel.com.au> Mail-Followup-To: Matthias Buelow , freebsd-stable@freebsd.org References: <20030723173427.GA72876@vmunix.com> <20030723140329.C92624@carver.gumbysoft.com> <20030723221336.GA26555@pit.databus.com> <20030723223654.GA24008@moghedien.mukappabeta.net> <20030723224436.GD22166@Odin.AC.HMC.Edu> <20030724021726.GJ430@gsmx07.alcatel.com.au> <3F1F45E2.5080506@mukappabeta.de> Mime-Version: 1.0 In-Reply-To: <3F1F45E2.5080506@mukappabeta.de> User-Agent: Mutt/1.4.1i X-MIMETrack: Itemize by SMTP Server on SYDSMTP01/AlcatelAustralia(Release 5.0.12 |February 13, 2003) at 25/07/2003 07:50:21 AM,|February 13, 2003) at 25/07/2003 07:50:22 AM, Serialize complete at 25/07/2003 07:50:22 AM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline cc: freebsd-stable@freebsd.org Subject: Re: malloc does not return null when out of memory 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: Thu, 24 Jul 2003 21:50:25 -0000 On 2003-Jul-24 04:35:14 +0200, Matthias Buelow wrote: >What makes me ask the following (note that it's neither a flame, nor a >suggestion). Does FreeBSD actually account the used swap/vm so far (it >needn't since it doesn't guarantee that it'll be available, with >overcommit) or does it not do that (i.e., it has no idea of how much vm >was requested by all processes so far, without having to go through the >maps of all processes, of course)? Have a look at how systat(1) or top(1) calculate the number they report. AFAIK, the kernel doesn't accumulate this information into a single total or make use of it in VM allocation decisions. > And is it planned in the (distant) >future to add a knob to toggle overcommitting of swap? All I can say is I'm unaware of any such plan. Based on the previous threads, the VM experts appear to be either against this or don't see any benefit. > While with large >disks and hence swap sizes this probably isn't a pressing problem for >most applications, it might be nice to be able to control the system not > to randomly kill off applications or force the user to meticulously >plan and calculate memory load of the planned application zoo in order >to tune the ulimits of various memory-hungry processes in a way that >they'll all fit into swap in the worst case situation. This comes up every time this thread starts. As I said before - read the archives. If you think you have a solution that works and avoids at least the larger pitfalls (see the archives), you need to provide patches (or show a willingness to pay someone else to write the code). Peter