Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jan 2011 12:51:44 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-performance@freebsd.org
Subject:   Re: tunning disk cache for pgsql?
Message-ID:  <ig1m0g$7k9$1@dough.gmane.org>
In-Reply-To: <20101231090612.GN2660@baneblade.noc.nerim.net>
References:  <20101228135940.GE2660@baneblade.noc.nerim.net>	<AABD98FE-DA25-4A09-86D6-EBC341040A35@nasby.net> <20101231090612.GN2660@baneblade.noc.nerim.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 31/12/2010 10:06, Nicolas Haller wrote:

> Someone knows if there is a page which explains FreeBSD mechanisms about
> memory and fs cache management? I think I must read something on it :-)

I don't think there's a single up to date document describing all of it, 
but it's conceptually simple and similar to what other OSes do. It's 
just that "top" output is somewhat verbose and low-level.

You can start here: 
http://www.freebsd.org/doc/en/books/arch-handbook/vm.html (it's a bit 
outdated).

Basically, to support both mmap() and read() / write(), the OS thinks of 
everything in terms of memory pages. When an application reads or writes 
something from / to a file, it's a "page-in" or "page-out" of a sort, 
and the page gets put in the active list. After some time it spends 
unused by the process, it's moved to the inactive list, then to the 
cache list. These separate lists exist AFAIK mostly to speed up searching.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ig1m0g$7k9$1>