Contributed by Peter N. M. Hansteen on from the Hash for FFS sake dept.
rsadowski@
),
OpenBSD developer and prolific blogger,
has been looking into file system performance optimizations on our favorite
operating system, and is now sharing his tips and tricks in
FFS optimizations with dirhash on his blog.
He leads in with a TL;DR:
tl;drConsider playing with
sysctl vfs.ffs.dirhash_maxmem
to increase the maximum dirhash cache.
That said, it is worth your time to read the whole thing!
By Janne Johansson (jj) jj@stacken.kth.se on http://www.inet6.se
I checked the current values on ftp.eu.openbsd.org and it was very close to the 5M limit, so I bumped it to 50M and it rose very quickly.
When it was close to reaching 40M or so, I bumped it to 256M and then left it overnight, and it seems to have stabilized at 43-something M, so I think we can safely say that if you have large dirs and your machine is close to the 5M limit, just set it to 50M and you should be fine for most usage. Of course, if we could make this autotune somehow, perhaps adding 10% when it reaches 90% of the current limit upto a max fixed limit it would be nice. As written in the article, most modern machines can waste 50M on it if needed.
I also checked anoncvs.eu, but it wasn't even close to 3M so while it traverses a lot of dirs, they are each very small, compared to the packages/ dirs for obsd releases, so I left it at 5M.
Reply