From owner-freebsd-questions@FreeBSD.ORG Mon Apr 21 14:52:51 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AC76106566B for ; Mon, 21 Apr 2008 14:52:51 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.bluestop.org (unknown [IPv6:2001:41c8:1:548a::2]) by mx1.freebsd.org (Postfix) with ESMTP id D68F88FC27 for ; Mon, 21 Apr 2008 14:52:50 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from [IPv6:2a01:348:10f:0:d478:18a8:b403:a001] (unknown [IPv6:2a01:348:10f:0:d478:18a8:b403:a001]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTP id 98F0230108; Mon, 21 Apr 2008 15:52:49 +0100 (BST) Message-ID: <480CAA30.8060106@cran.org.uk> Date: Mon, 21 Apr 2008 15:52:32 +0100 From: Bruce Cran User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Jon Radel References: <20080420212847.178a849d.herbert.raimund@gmx.net> <480BA0A2.3060109@radel.com> In-Reply-To: <480BA0A2.3060109@radel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: herbert langhans , freebsd-questions@freebsd.org Subject: Re: RAM & Swap & Speed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2008 14:52:51 -0000 Jon Radel wrote: > herbert langhans wrote: >> Hi Daemons, >> recently I had to add some more RAM on a workstation. Was 512MB before and is 2GB now, the reason was to give some graphic apps more space. >> >> But to my surprise the workstation ran faster--but before adding RAM it did NOT make use of the swap-partition and after the big RAM chip of course not too (checked it with #top). >> >> This was a Slackware installation. Had anyone experienced such effect on BSD as well? > > Why are you asking about Slackware file caching on a FreeBSD mailing > list? :-) > > In any case, what you're probably seeing is the effect of having lots of > spare RAM to cache files. In FreeBSD top look at the Cache and Buf > values up top. If you're doing a lot of file I/O, this can make a > noticeable difference, particularly if you're repeatedly reading the > same files. > > However, as is usually the case, unless you do some benchmarks on *your* > computer, it's hard to say more than "the first couple GB of RAM you add > will probably make your workstation run faster." > > --Jon Radel It's not only the Cache and Buf values that show how much memory is used for caching - any memory which isn't being used by the programs/kernel and which isn't accounted for in the Free value can be used as cache. So for example my PC is currently showing 5668KB Cache and 110MB Buf but also there's also 638MB showing as 'Inact'. The vast majority of that 638MB will be used as cache. -- Bruce