tunning disk cache for pgsql?

Ivan Voras ivoras at freebsd.org
Wed Jan 5 11:51:59 UTC 2011

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 

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.

More information about the freebsd-performance mailing list