Manipulating disk cache (buf) settings
gurney_j at resnet.uoregon.edu
Mon May 23 10:44:18 PDT 2005
Sven Willenberger wrote this message on Mon, May 23, 2005 at 10:58 -0400:
> We are running a PostgreSQL server (8.0.3) on a dual opteron system with
> 8G of RAM. If I interpret top and vfs.hibufspace correctly (which show
> values of 215MB and 225771520 (which equals 215MB) respectively. My
> understanding from having searched the archives is that this is the
> value that is used by the system/kernel in determining how much disk
> data to cache.
This is incorrect... FreeBSD merged the vm and buf systems a while back,
so all of memory is used as a disk cache.. The buf cache is still used
for filesystem meta data (and for pending writes of files, but those buf's
reference the original page, not local storage)...
Just as an experiment, on a quiet system do:
dd if=/dev/zero of=somefile bs=1m count=2048
and then read it back in:
dd if=somefile of=/dev/null bs=1m
and watch systat or iostat and see if any of the file is read... You'll
probably see that none of it is...
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-stable