From owner-freebsd-stable@FreeBSD.ORG Tue Apr 5 14:29:56 2011 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49BD81065675 for ; Tue, 5 Apr 2011 14:29:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 92EE08FC24 for ; Tue, 5 Apr 2011 14:29:55 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA05564; Tue, 05 Apr 2011 17:29:48 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9B275B.3060000@FreeBSD.org> Date: Tue, 05 Apr 2011 17:29:47 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pete French References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: spawk@acm.poly.edu, freebsd-stable@FreeBSD.org, freebsd@jdc.parodius.com Subject: Re: Kernel memory leak in 8.2-PRERELEASE? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Apr 2011 14:29:56 -0000 on 05/04/2011 17:04 Pete French said the following: >> Adding some swap would help a lot more. > > So, I run a lot of systems without swap - basically my > thinking at the time I set them up went like this. > > "I have 4 gig of memory, and 4 gig of swap. Surely running 8 gig of > memory and no swap will be just as good ?" > > but, is that actually true ? Is real RAM as good as an equivalent amount > of swap, or is there smething special about swap which means you shoud > have some no matter how much RAM you have ? I think that it depends. I usually do use swap for the following reasons: 1. some anonymous memory ("malloced") may reasonably go to swap to free some RAM for caching data; that can have overall performance benefits depending in system usage patterns; 2. VM is happy dealing out RAM for any uses until some low watermarks are reached, then the system tries to free up some RAM. Depending on the amount of memory (and those thresholds) and "burstiness" of memory demand a system may potentially run completely out of memory and would have to kill some processes. Having swap provides some cushion. Swap kind of smooths any bursts. (And it can also slow things down as a side effect) Of course, the system can run out of swap as well, but that would mean that you really need more RAM. -- Andriy Gapon