mirror_zfs/tests/zfs-tests/include
Alexander Motin 37f6845c6f
Improve too large physical ashift handling
When iterating through children physical ashifts for vdev, prefer
ones above the maximum logical ashift, that we can actually use,
but within the administrator defined maximum.

When selecting top-level vdev ashift, do not set it to the defined
maximum in case physical ashift is even higher, but just ignore one.
Using the maximum does not prevent misaligned writes, but reduces
space efficiency.  Since ZFS tries to write data sequentially and
aggregates the writes, in many cases large misanigned writes may be
not as bad as the space penalty otherwise.

Allow internal physical ashifts for vdevs higher than SHIFT_MAX.
May be one day allocator or aggregation could benefit from that.

Reduce zfs_vdev_max_auto_ashift default from 16 (64KB) to 14 (16KB),
so that ZFS may still use bigger ashifts up to SHIFT_MAX (64KB),
but only if it really has to or explicitly told to, but not as an
"optimization".

There are some read-intensive NVMe SSDs that report Preferred Write
Alignment of 64KB, and attempt to build RAIDZ2 of those leads to a
space inefficiency that can't be justified.  Instead these changes
make ZFS fall back to logical ashift of 12 (4KB) by default and
only warn user that it may be suboptimal for performance.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #13798
2022-09-08 10:30:53 -07:00
..
.gitignore Add zpool events tests 2017-05-22 12:34:42 -04:00
blkdev.shlib tests: include: use already-set $UNAME instead of shelling out to uname each time 2022-04-01 18:02:59 -07:00
commands.cfg Add Linux posix_fadvise support 2022-09-08 10:29:41 -07:00
default.cfg.in Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libtest.shlib Add snapshots_changed as property 2022-08-02 16:45:30 -07:00
math.shlib tests: include: math: simplify bc conditions, review $? 2022-04-01 17:59:24 -07:00
properties.shlib Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
tunables.cfg Improve too large physical ashift handling 2022-09-08 10:30:53 -07:00
zpool_script.shlib tests: review every awk(1) invocation 2022-04-01 17:57:55 -07:00