Is it possible to set recordsize to 2M

rdfreak

Dabbler
Joined
May 22, 2019
Messages
12
I'm on TrueNAS Scale, and for my pool of 8x18TB HDDs with a 4KiB physical sector size, it looks like that I'll be paying a 29% tax to raidz2 with a 1M record size. I was hoping I could get the 26% according to this popular spreadsheet - the 3% difference amounts to more than 3TiB, so I'd rather accept the performance trade-offs past the 1M value. The pool will mostly consist of many, very large files accessed in a write-once read-many manner, so I think the use case is appropriate.

I tried setting vfs.zfs.max_recordsize=2097152 via sysctl, as older posts here indicate, but... vfs tunables don't seem to be supported in TrueNAS Scale? How can I increase the recordsize to 2M?
 

rdfreak

Dabbler
Joined
May 22, 2019
Messages
12
I figured out how to increase the record size. As per OpenZFS' GitHub docs:
echo 16777216 >> /sys/module/zfs/parameters/zfs_max_recordsize
The UI's drop down listed bigger record sizes only once I created a dataset from the shell. Afterwards, even creating a new pool allowed setting monstrous record sizes.

However, the UI still reports 92.96 TiB available space, which corresponds to the 29% space cost (for a 130.96 TiB pool) of raidz2 from the spreadsheet. Is the UI misrepresenting available space, or am I miscalculating/misunderstanding?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Available space is presented as best-effort estimate and not an exact logical limit. Different block sizes (real, not configured) and different compression ratios make it rather difficult to give an exact number. Furthermore, quotas are not exact and slight variations may exist.

tl;dr - Don't overthink this.

it looks like that I'll be paying a 29% tax to raidz2 with a 1M record size
How did you reach that conclusion?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
@rdfreak A quick note - the spreadsheet you've linked only applies for blocks after compression. Unless you're planning to store 100% incompressible data, you'll likely end up somewhat different in the RAIDZ overheard vs. what's shown there.
 
Top