Maximizing zvol size

Status
Not open for further replies.

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
How does one create a zvol that uses as much of a volume as possible?

(I'm aware that performance will go down due to fragmentation if I fill the zvol more than 50% and will avoid that)

IE, given a specific volume size that's reported by FreeNAS, is there a way to calculate the max zvol size so I'm not guessing on the size to enter on the "create zvol" dialog?

Thanks!
 

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
Thanks you very much for the quick response but I'm not sure this is accurate or perhaps I'm not using it correctly.

I'm assuming "Usable data space" is the max zvol size?

Assuming yes, I plugged in the values for a simple mirror I have running with two 4TB drives. If I plug in 4TB, 2 drives, and "Mirror", it says "Usable data space" is 2.864 TiB However, using my guessing method, I've found that 3532 GiB (3.532 TiB) is a valid zvol size.

What's interesting is that in the 3 volumes I've configured so far using the guessing method, I've found that max zvol size ends up between 88.5 and 88.8% of the pool size (as obtained with zpool list -pv).
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I think you’re misunderstanding something here. 50% is the recommended effective used space of a pools available space with iSCSI, due to the nature of iSCSI. If you don’t use iSCSI you can use up to 80% of a pools available space before free space starts becoming an issue.

The calculator you got linked will show you the available pool size for a given set of drives and configuration. It will then fairly accurately calculate the metadata overhead and finally display the 80% limit, your net pool size for normal use.
 

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
I think you’re misunderstanding something here. 50% is the recommended effective used space of a pools available space with iSCSI, due to the nature of iSCSI. If you don’t use iSCSI you can use up to 80% of a pools available space before free space starts becoming an issue.

The calculator you got linked will show you the available pool size for a given set of drives and configuration. It will then fairly accurately calculate the metadata overhead and finally display the 80% limit, your net pool size for normal use.
Sorry, I should have mentioned that I'm using iSCSI.

However, my understanding is that the 50% number:
1) Is a rough YMMV type number that depends on various factors (ie, disks vs SSDs, use patterns, how much performance degradation you're willing to accept, etc)
2) Can be implemented by either (a) creating a zvol that only takes 50% or (b) creating a larger zvol but trying to keep usage under 50% of the entire pool. I'm trying to do (b).
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710

Thank you for linking my calculator, but the next time can you please post the link to the thread: https://forums.freenas.org/index.php?threads/zfs-raid-size-and-reliability-calculator.28191/ so the member has the manual so he will be able to understand the numbers, thanks :)

NB: the block overhead is still disabled; now that I know how to calculate the number I really need to find time to update the app...
 
Last edited:
Status
Not open for further replies.
Top