Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2007 10:29:18 +0100
From:      "Ivan Voras" <ivoras@freebsd.org>
To:        "Bruce Cran" <bruce@cran.org.uk>
Cc:        Laszlo Nagy <gandalf@shopzeus.com>, freebsd-questions@freebsd.org
Subject:   Re: How to set maximum disk cache size?
Message-ID:  <9bbcef730711170129t5af29c81u6442e1d6ba8c8b47@mail.gmail.com>
In-Reply-To: <473E2FAA.2050607@cran.org.uk>
References:  <473C7C0A.4060708@shopzeus.com> <20071115182220.E60452@wojtek.tensor.gdynia.pl> <473CAF70.1090006@cran.org.uk> <fhk6pp$6fm$1@ger.gmane.org> <473DC14D.1060601@shopzeus.com> <9bbcef730711160829s186d0784g8546c2656f913c0f@mail.gmail.com> <473E2FAA.2050607@cran.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 17/11/2007, Bruce Cran <bruce@cran.org.uk> wrote:
> Ivan Voras wrote:
> > On 16/11/2007, Laszlo Nagy <gandalf@shopzeus.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bbcef730711170129t5af29c81u6442e1d6ba8c8b47>