From owner-freebsd-current@FreeBSD.ORG Sun Apr 20 03:14:06 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 3346737B401 for ; Sun, 20 Apr 2003 03:14:06 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 930F843FDF for ; Sun, 20 Apr 2003 03:14:05 -0700 (PDT) (envelope-from das@freebsd.org) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h3KAE28M003173; Sun, 20 Apr 2003 03:14:02 -0700 (PDT) (envelope-from das@freebsd.org) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h3KAE1Ev003172; Sun, 20 Apr 2003 03:14:01 -0700 (PDT) (envelope-from das@freebsd.org) Date: Sun, 20 Apr 2003 03:14:01 -0700 From: David Schultz To: Bruce Evans Message-ID: <20030420101401.GA2821@HAL9000.homeunix.com> Mail-Followup-To: Bruce Evans , Lucky Green , freebsd-current@freebsd.org References: <000501c30682$4e5e64b0$6601a8c0@VAIO650> <20030420002940.GB46590@HAL9000.homeunix.com> <20030420191744.G19683@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030420191744.G19683@gamplex.bde.org> cc: Lucky Green cc: freebsd-current@freebsd.org Subject: Re: Broken memory management on system with no swap 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: Sun, 20 Apr 2003 10:14:06 -0000 On Sun, Apr 20, 2003, Bruce Evans wrote: > On Sat, 19 Apr 2003, David Schultz wrote: > > > On Sat, Apr 19, 2003, Lucky Green wrote: > > > There appears to be a memory management bug that affects systems without > > > swap files. Processes are killed off due to the server being "out of > > > swap space" even though top shows some 800MB of "inactive" memory > > > available. > > > > ``Inactive'' just means that the page just hasn't been accessed > > for a while and is a candidtate for replacement. However, on a > > system without swap, the system has nowhere to send the page if it > > is dirty. The only pages that can always be discarded and reused > > are those in the ``Cache'' and ``Free'' categories. > > > > So the bottom line is that you really are running out of memory. > > So the bug is mainly in vm making only a relatively useless statistic > available. On my systems, `Inact' is usually mainly for (non-dirty) > VMIO pages. Right. dillon was planning to separate out the dirty and clean pages in the inactive queue at some point. ISTR that his intent was along the lines of optimizing write clustering by making dirty pages easier to find, or something along those lines. But the number of inactive dirty pages is useful as a statistic by itself, too. > The system has little difficulty discarding these, so > I haven't had problems with processes being killed despite not using > (much | any) swap since memories became cheap enough a few years ago. I generally configure swap and use it only once in a blue moon. Since there's no truly graceful way to handle an out-of-swap condition, I'm usually glad that it's there once in a while. But Lucky's concern is that confidential data should never hit the disk.