Page MenuHomeFreeBSD

Make the ZFS min_auto_ashift=12 setting persistent
ClosedPublic

Authored by allanjude on May 25 2017, 4:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 10:25 AM
Unknown Object (File)
Fri, May 3, 8:10 AM
Unknown Object (File)
Sat, Apr 27, 3:12 AM
Unknown Object (File)
Feb 14 2024, 9:30 AM
Unknown Object (File)
Feb 8 2024, 7:24 AM
Unknown Object (File)
Jan 17 2024, 10:50 PM
Unknown Object (File)
Dec 27 2023, 9:12 AM
Unknown Object (File)
Dec 20 2023, 5:53 AM
Subscribers

Details

Summary

Some users have reported problems where they created a pool with 4k sectors using the installer, but when they added additional disks later, the min_auto_ashift value had reverted to the default (9), causing their second vdev to have worse performance

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Is this supposed to be in loader.conf or in sysctl.conf? Does it matter?

I've traditionally controlled this in sysctl.conf, but perhaps loader.conf is a better, more permanent place.

IMO if it is really supposed to be default, then the correct place is in /boot/defaults/loader.conf - overloading /boot/loader.conf will only confuse people.

It is probably time to make 4K (ashift=12) the default and have the 512b (ashift=9) users explicitly declare their special requirement, but it should not happen without further discussion and a clear way to communicate this to the userbase.

In D10895#225791, @feld wrote:

Is this supposed to be in loader.conf or in sysctl.conf? Does it matter?

I've traditionally controlled this in sysctl.conf, but perhaps loader.conf is a better, more permanent place.

It doesn't explicitly matter. The installer infrastructure for writing sysctl.conf was added by remko@ and is actually done wrong, and doesn't exist in stable/11, so I did it in loader.conf to make it an easy merge to stable/11

IMO if it is really supposed to be default, then the correct place is in /boot/defaults/loader.conf - overloading /boot/loader.conf will only confuse people.

In this case, it is an option in the installer, not a system wide default.

In D10895#225833, @feld wrote:

It is probably time to make 4K (ashift=12) the default and have the 512b (ashift=9) users explicitly declare their special requirement, but it should not happen without further discussion and a clear way to communicate this to the userbase.

I agree that might be the right thing to do, however I am not sure what OpenZFS would think of that. The idea is for ZFS to be the same on every platform. At the same time, Linux has already gone and done their own thing here, so.

This revision is now accepted and ready to land.May 25 2017, 5:32 PM

ok, that explanation does make sense, LGTM.

This revision was automatically updated to reflect the committed changes.