Good Riddance, Filesystem Consistency Check

An old ZFS hand shared with us two simple ways to improve performance of your (production) ZFS filesystem, one of which is to “disable ZIL”. And what is ZIL?

The ZIL is the way ZFS maintains consistency until it can get the blocks written to their final place on the disk.

As we all know, disabling stuff that has to do with consistency checking is not a good idea.

Hopefully no reader left the page without reading the comments, because one of them contains a life-saving advice:

Also, you should not turn off the zil. If your storage device has a non-volatile order-preserving cache, then you can safely turn off the flush write cache command by setting zfs_nocacheflush=1 in /etc/system.

Oh, o-kay!

Obviously this kind of “tuning” is quite popular – why spend money on crappy (insert your most hated storage vendor of the day) storage when you can tune your filesystem instead?

> There’s actually a tunable to disable cache flushes:
> zfs_nocacheflush and in older code (like S10U3) it’s zil_noflush.

Yes, but we didn’t want to publicise this internal switch. (I would not call it a tunable). We (or at least I) are regretting publicising zil_disable, but using zfs_nocacheflush is worse. If the device is volatile then we can get pool corruption. An uberblock could get written before all of its tree.

It seems there are still dream jobs out there and I was badly mistaken when I thought “get paid to play around with company data” would be false advertising.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: