7.3 - optimizing filesystem - cache all metadata

cronfy cronfy at gmail.com
Tue Apr 19 18:13:57 UTC 2011


I have FreeBSD 7.3 server that is used for web sites. It performs many
filesystem operations, so filesystem performance is very important. I am
looking how can it be improved.

I already use vfs.lookup shared=1, it helped me some time ago to decrease
CPU time usage on filesystem operations. I also increased
vfs.ufs.dirhash_maxmem to 67108864. But It still sometimes takes several
seconds to ls directory that s not in the cache and fstat() calls sometimes
slow when IO is high.

Can filesystem performance be improved more? I think performance would
benefit from increasing memory used for file metadata cache. One of the most
frequent operations is fstat(). If it could be possible to tell FreeBSD to
keep all metadata cache in memory and never clear it, all repeating fstat()
operations would become very fast.

How can I see how much memory is used for filesystem cache? Is it possible
to increase this memory and increase time that cache entry is keeped in the
memory (probably to infinity)?

Thanks in advance.

Олег Петрачев

More information about the freebsd-questions mailing list