[zfs-discuss] Add note about dnodesize=auto to Root-on-ZFS guides

Mike Pastore mike at oobak.org
Mon Nov 19 09:27:16 EST 2018

On Sun, Nov 18, 2018 at 9:14 PM Kash Pande via zfs-discuss <
zfs-discuss at list.zfsonlinux.org> wrote:

> On 2018-11-17 3:53 p.m., Mike Pastore via zfs-discuss wrote:
> It seems as though it's generally recommended to set dnodesize=auto when
> you set xattr=sa [..]
> Where did you get this idea? if it's about #5182 then you are mistaken
> about it being a general recommendation.
I appreciate the push back on my original claim. This is a learning
opportunity for me.

#5182, the metadata allocation class PR? No, nothing related to that.
Here's what I've seen:

In zfs(8) for 0.7.12, under the dnodesize option:

Consider setting dnodesize to auto if the dataset uses the xattr=sa
> property setting and the workload makes heavy use of extended attributes.

In the FAQ page in the ZoL wiki, under CEPH/ZFS:

The CEPH filestore back-end heavily relies on xattrs, for optimal
> performance all CEPH workloads will benefit from the following ZFS dataset
> parameters
>    - xattr=sa
>    - dnodesize=auto
> (No, I'm not using CEPH, but it stands to reason that other xattr-heavy
workloads would benefit from the same tuning.)

In zpool-features(5) for 0.7.12, under the large_dnode feature:

This feature becomes active once a dataset contains an object with a dnode
> larger than 512B, which occurs as a result of setting the dnodesize dataset
> property to a value other than legacy.

My understanding of xattr=sa is that it improves metadata performance by
storing extended attributes in the dnode instead of as separate, hidden
files. My interpretation of the documentation is that dnodesize=legacy
cripples xattr=sa by restricting the size of the dnode to 512b. Ergo, most
situations that indicate xattr=sa should also indicate dnodesize=auto. Am I
missing something?

> It is useful in *certain* situations but not *generally*. You don't want
> to run into any of the corner cases with the large_dnode feature;
> historically they have led to corruption and not-so-fun-times.
This note and George's note about unbootable root pools is definitely
giving me pause. Would a fixed dnodesize be better than auto? Where can I
read more about these corner cases?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20181119/81efe791/attachment.html>

More information about the zfs-discuss mailing list