OpenBSD Journal

FFS optimizations with dirhash, as blogged by rsadowski@

Contributed by Peter N. M. Hansteen on from the Hash for FFS sake dept.

Rafael Sadowski (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;dr

Consider 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!


Comments
  1. 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.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]