ZFS tuning tips?

Craig Boston craig at xfoil.gank.org
Wed Jun 13 16:25:50 UTC 2007


There have been several threads on the mailing lists regarding tuning
ZFS for performance and/or getting it to work on i386 without panicing.
However searching for them is turning out to be problematic as I
remember reading (and posting to) topics that I can't seem to find in
the archives, and what I do find is possibly obsoleted by some of pjd's
recent work with namecache integration (is this even enabled by
default?)

Would it be possible for those who have been running with it to post any
tips or tweaks that have been found to work well on recent CURRENT (for
either i386 or amd64)?  It would be great if someone with access to the
Wiki could gather them together and put them somewhere.
http://wiki.freebsd.org/ZFSTuning perhaps?

Here's my contribution:

A new machine with 2GB RAM running FreeBSD/i386 runs into the kmem_map
too small panic.  Pretty much everything except / is on ZFS.  Reducing
kern.maxvnodes from 100000 to 75000 does not help much.  Reducing it all
the way to 50000 seems to work, but is probably suboptimal (see below).

And now some questions:

Possibly related to reducing maxvnodes, I'm running into a strange
problem that appears to be cache-related.  I noticed that during
port installs, the "Registering installation" phase started taking
forever.  I tracked it down to pkg_info -qO [name] going very slow and
causing a _lot_ of disk access.

It seems like the entries in /var/db/pkg were not being cached (or
rather some old stuff wasn't being purged to make room for it).  Doing
an umount /usr/obj seemed to help quite a bit (and caused vfs.numvnodes
to drop from ~45000 to 4000), but it eventually happened again.  What
perplexes me is that I still had about 1700M Free memory that should
have been available for caching.

This is on i386.  I'd love to switch to amd64 but am held back by the
nvidia driver.  I wouldn't miss 3D acceleration _that_ much, but last I
checked the 'nv' driver didn't support using both heads on the card,
which is kind of a showstopper.  Anybody know if this is possible in
Xorg 7.2?

Craig


More information about the freebsd-current mailing list