From 002bc3da6a4b82bef90763478831f82fb509dc59 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 10 Nov 2025 18:44:46 -0500 Subject: [PATCH] BRT: Increase block size from 4KB to 8KB According to my observations, BRT ZAPs are typically compressible 3:1 for data and 2:1 for indirects. With ashift=12, typical these days, it means increasing the block sizes to 8KB we may get most of possible compression, reducing on-disk and in-ARC BRT footprint in half by the cost of some compression/decompression overhead, but without real write inflation, only some dirty data increase. Increase to 32KB similar to DDT could further increase compression and storage efficiency, but at the cost of write inflation and much bigger dirty data increase, which we can not properly control now. So lets leave this for a time when BRT log gets implemented. Reviewed-by: Brian Behlendorf Signed-off-by: Alexander Motin Closes #17916 --- man/man4/zfs.4 | 4 ++-- module/zfs/brt.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/man4/zfs.4 b/man/man4/zfs.4 index b01d9a8e5..60ec56b4d 100644 --- a/man/man4/zfs.4 +++ b/man/man4/zfs.4 @@ -273,12 +273,12 @@ force this many of them to be gang blocks. .It Sy brt_zap_prefetch Ns = Ns Sy 1 Ns | Ns 0 Pq int Controls prefetching BRT records for blocks which are going to be cloned. . -.It Sy brt_zap_default_bs Ns = Ns Sy 12 Po 4 KiB Pc Pq int +.It Sy brt_zap_default_bs Ns = Ns Sy 13 Po 8 KiB Pc Pq int Default BRT ZAP data block size as a power of 2. Note that changing this after creating a BRT on the pool will not affect existing BRTs, only newly created ones. . -.It Sy brt_zap_default_ibs Ns = Ns Sy 12 Po 4 KiB Pc Pq int +.It Sy brt_zap_default_ibs Ns = Ns Sy 13 Po 8 KiB Pc Pq int Default BRT ZAP indirect block size as a power of 2. Note that changing this after creating a BRT on the pool will not affect existing BRTs, only newly created ones. diff --git a/module/zfs/brt.c b/module/zfs/brt.c index 9e389c872..60f42116c 100644 --- a/module/zfs/brt.c +++ b/module/zfs/brt.c @@ -260,8 +260,8 @@ static int brt_zap_prefetch = 1; #define BRT_DEBUG(...) do { } while (0) #endif -static int brt_zap_default_bs = 12; -static int brt_zap_default_ibs = 12; +static int brt_zap_default_bs = 13; +static int brt_zap_default_ibs = 13; static kstat_t *brt_ksp;