Default zfs_max_recordsize to 16M

Increase the default allowed maximum recordsize from 1M to 16M.
As described in the zfs(4) man page, there are significant costs
which need to be considered before using very large blocks.
However, there are scenarios where they make good sense and
it should no longer be necessary to artificially restrict their
use behind a module option.

Note that for 32-bit platforms we continue to leave this
restriction in place due to the limited virtual address space
available (256-512MB).  On these systems only a handful
of blocks could be cached at any one time severely impacting
performance and potentially stability.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12830
Closes #13302
This commit is contained in:
Rich Ercolani
2022-04-28 18:12:24 -04:00
committed by GitHub
parent 63b18e4097
commit f2330bd156
7 changed files with 20 additions and 28 deletions
@@ -35,7 +35,7 @@ log_must disk_setup
log_must zpool create $TESTPOOL raidz $ZPOOL_DISKS special mirror \
$CLASS_DISK0 $CLASS_DISK1
for value in 256 1025 2097152
for value in 256 1025 33554432
do
log_mustnot zfs set special_small_blocks=$value $TESTPOOL
done
@@ -56,7 +56,7 @@ set -A args "ab" "-?" "-cV" "-Vc" "-c -V" "c" "V" "--c" "-e" "-s" \
"-blah" "-cV 12k" "-s -cV 1P" "-sc" "-Vs 5g" "-o" "--o" "-O" "--O" \
"-o QuOta=none" "-o quota=non" "-o quota=abcd" "-o quota=0" "-o quota=" \
"-o ResErVaTi0n=none" "-o reserV=none" "-o reservation=abcd" "-o reserv=" \
"-o recorDSize=64k" "-o recordsize=2048K" "-o recordsize=2M" \
"-o recorDSize=64k" "-o recordsize=32768K" "-o recordsize=32M" \
"-o recordsize=256" "-o recsize=" "-o recsize=zero" "-o recordsize=0" \
"-o mountPoint=/tmp/tmpfile$$" "-o mountpoint=non0" "-o mountpoint=" \
"-o mountpoint=LEGACY" "-o mounpoint=none" \
@@ -78,7 +78,7 @@ while (( i < ${#dataset[@]} )); do
(( j += 1 ))
done
# Additional recordsize
set_n_check_prop "2048K" "recordsize" "${dataset[i]}" false
set_n_check_prop "32768K" "recordsize" "${dataset[i]}" false
set_n_check_prop "128B" "recordsize" "${dataset[i]}" false
(( i += 1 ))
done
@@ -52,7 +52,7 @@ log_onexit cleanup
set -A args "QuOta=none" "quota=non" "quota=abcd" "quota=0" "quota=" \
"ResErVaTi0n=none" "reserV=none" "reservation=abcd" "reserv=" \
"recorDSize=64k" "recordsize=2M" "recordsize=2048K" \
"recorDSize=64k" "recordsize=32M" "recordsize=32768K" \
"recordsize=256" "recsize=" "recsize=zero" "recordsize=0" \
"mountPoint=/tmp/tmpfile$$" "mountpoint=non0" "mountpoint=" \
"mountpoint=LEGACY" "mounpoint=none" \