From owner-freebsd-questions@FreeBSD.ORG Sat Nov 17 09:29:28 2007 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 F118516A418 for ; Sat, 17 Nov 2007 09:29:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.185]) by mx1.freebsd.org (Postfix) with ESMTP id C24DF13C455 for ; Sat, 17 Nov 2007 09:29:27 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so956799rvb for ; Sat, 17 Nov 2007 01:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=19bX9RgPCRlMKBwSlEEINJbnAxqOFCyq9jnu5ln9ON4=; b=nwtFlb/lua1CF7sH4zxWm5AvJM/OSvBGuVFH9XeIHHYtc3O6NufqOr9vaAL51mi7DuLZZ0QM+J/47pKdLX4bvVTQEPaxx7t4wOzXX/6N+jMus/WUqSdE+CL5kcGeqmLfCUWAPjpm2MdVbNFpjWyUOmpymLdLB9TMQpQe5B4CuLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=VOyWeQPCO8YQ+x5oQbnlcNBnwD9TbeJwpc5MvKMHCYX+9FIGMp/rqIH0yq4hwdN4mrI6NhHaztpgk4dE4ddS2eTSsgkyRr4+ga3i223AGaAeIu3fF8zbfygE6AXZEN6lT1hprCbRmzKYquIVVbonXu7H9l/GMBHijZy4vCDsju4= Received: by 10.141.132.8 with SMTP id j8mr1094689rvn.1195291758698; Sat, 17 Nov 2007 01:29:18 -0800 (PST) Received: by 10.141.211.5 with HTTP; Sat, 17 Nov 2007 01:29:18 -0800 (PST) Message-ID: <9bbcef730711170129t5af29c81u6442e1d6ba8c8b47@mail.gmail.com> Date: Sat, 17 Nov 2007 10:29:18 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Bruce Cran" In-Reply-To: <473E2FAA.2050607@cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <473C7C0A.4060708@shopzeus.com> <20071115182220.E60452@wojtek.tensor.gdynia.pl> <473CAF70.1090006@cran.org.uk> <473DC14D.1060601@shopzeus.com> <9bbcef730711160829s186d0784g8546c2656f913c0f@mail.gmail.com> <473E2FAA.2050607@cran.org.uk> X-Google-Sender-Auth: 102918cd1d533f4b Cc: Laszlo Nagy , freebsd-questions@freebsd.org Subject: Re: How to set maximum disk cache size? 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: Sat, 17 Nov 2007 09:29:29 -0000 On 17/11/2007, Bruce Cran wrote: > Ivan Voras wrote: > > On 16/11/2007, Laszlo Nagy wrote: > >> Ivan Voras wrote: > > > >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/vm-fileio.html > >>> > >> I read this too but I don't understand. Too difficult for me. > >> > >> So what is the answer? Do I need to set a sysctl or will FreeBSD use all > >> available free memory for caching file data from disk? > > > > You don't need to change anything, it's the default state. > > So as long as the memory isn't shown as "Free" in top, any memory that > isn't being used by the kernel or by applications is being used for > cache/buffer? Yes. > One reason why I had thought that FreeBSD didn't use all > the memory for caching disk accesses was because I saw a different > behaviour when decompressing large archives between Linux and FreeBSD: > in Linux there's a massive burst of activity as the archive gets put > straight into memory; then, once memory starts getting full it pauses > for what seems a very long time as it flushes all the data to disk. > FreeBSD doesn't seem to do that; it seems a lot smoother in that it > writes to the disk a lot more regularly - is this likely to be because > Linux has a higher limit on the number of dirty pages it can have in > memory before it writes them out to disk? Yes.