This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Why vfs.zfs.min_auto_ashift=9 by default?

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
Snufkin
Advanced User
Advanced User
Posts: 317
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Why vfs.zfs.min_auto_ashift=9 by default?

Post by Snufkin »

Noticed vfs.zfs.min_auto_ashift tunable is assigned a value of 9 by default.
Are there any valuable reasons not to have default value equal to 12?
It would've assured proper alignment of advanced 4K format HDDs.
XNAS 11.4.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2
ZFS 2 x HGST HDN726040ALE614, L2ARC PLEXTOR PX-128M5S

kenZ71
Advanced User
Advanced User
Posts: 379
Joined: 27 Jun 2012 20:18
Location: Northeast, USA
Status: Offline

Re: Why vfs.zfs.min_auto_ashift=9 by default?

Post by kenZ71 »

Paired up with 32bit hardware no longer being supported I have to agree ashift 9 needs to fade away.
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz

Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu

User avatar
ms49434
Developer
Developer
Posts: 828
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Why vfs.zfs.min_auto_ashift=9 by default?

Post by ms49434 »

add or modify vfs.zfs.min_auto_ashift in System > Advanced > sysctl.conf and assign a value of 12 will solve your issue. The value might be reset to a lower ashift, depending on the ashift of your vdevices.
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

User avatar
Snufkin
Advanced User
Advanced User
Posts: 317
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Why vfs.zfs.min_auto_ashift=9 by default?

Post by Snufkin »

ms49434 wrote:
13 Mar 2017 09:09
add or modify vfs.zfs.min_auto_ashift in System > Advanced > sysctl.conf and assign a value of 12...
Ashift value could even be changed on the fly in remote/local shell or N4F Tools|Execute command WebGUI page immediately before creating ZFS pool. Of course it remains in effect until the next reboot.

My question was about the reasons why the default ashift is still 9 and not 12.
Let's consider two cases when N4F user made mistake:
  1. vfs.zfs.min_auto_ashift=9 and 4K advanced format HDD - various tests found in the web show speed drop about 5-20 %,
  2. vfs.zfs.min_auto_ashift=12 and regular 512 bytes per sector format HDD - no speed drop (512 x 8 = 4096), may cause more ‘dead’ space with small files (less then 4K).
'Dead' space worst case: 7/8 of 4K sector will be empty if file is smaller than 512, which gives, for example, only 1 TB usable out of 8 TB HDD. Pretty frightening figure, isn't it?
Will we ever be faced with such a case? Definitely won't, even size of empty spreadsheet/text document starts from 7K, and all other types of media are much bigger.

I think it's better to eliminate the possibility to make wrong aligned partitions on advanced format HDD.
And not take into account very unlikely situation when ZFS is filled with an incredible amount of tiny files.
XNAS 11.4.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2
ZFS 2 x HGST HDN726040ALE614, L2ARC PLEXTOR PX-128M5S

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1058
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: Why vfs.zfs.min_auto_ashift=9 by default?

Post by JoseMR »

So I guess a default predefined sysctl for "vfs.zfs.min_auto_ashift" with value=12 could be set under the WebGUI, I was thinking on this time ago also to enforce use of 12.

EDIT: Better let FreeBSD defaults, and user can create a sysctl entry withing WebGUI wen needed.
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

Post Reply

Return to “Suggestions & Requests”