iSCSI fragmentation

Status
Not open for further replies.

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
I've just started to experiment with iSCSI and am looking at creating one or more iSCSI-only pools, each with a single ZVOL device extent.

After reading these forums, I have some admittedly noob-ish questions:

1) With regards to the "50% rule" is it okay to create a single ZVOL that uses the entire pool but keep an eye on the usage so it doesn't exceed 50%?

2) Or is it better to create a ZVOL that's 50% of the total pool size?

3) If I do the #2 approach, does the ZVOL only use the first 50% of the pool's blocks (somewhat like a drive partition)? Or, to avoid fragmentation, can it use any blocks anywhere in the pool (as long as it doesn't occupy more than 50%)?

4) Does the "50% rule" also apply to SSDs? Or can I go higher?

5) Does NFS have similar fragmentation issues as iSCSI does?

Thanks!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
3) If I do the #2 approach, does the ZVOL only use the first 50% of the pool's blocks (somewhat like a drive partition)?
That's not even possible, since ZFS is copy-on-write.

Does NFS have similar fragmentation issues as iSCSI does?
Yes, obviously. A block device is a block device, no matter how it's being shared.

Does the "50% rule" also apply to SSDs? Or can I go higher?
SSDs are interesting. Nobody has actually thoroughly benchmarked the effect of free space on block device performance and shared the data.

Intuitively, I expect the performance drop to be more towards the full side of the spectrum (with consistent enterprise drives like the Intels). Since SSDs also have much better IOPS in the first place, you can probably sustain a larger percentual drop while maintaining acceptable performance, too.
 

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
Thanks Ericloewe!

With regards to the different options for avoiding fragmentation (whether the target is 50% or say 80%), is there any disadvantage to giving the ZVOL the full pool space and then keeping an eye on the usage? Or does doing that make it harder for ZFS to allocate blocks efficiently?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
It doesn't make things harder, assuming that the other side issues trims and/or doesn't spread the writes around unnecessarily.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
If you make the ZVOL that large, there won't be space for snapshots, unless you know that TRIM/UNMAP works and keep a close eye on usage in the ZVOL.
 
Status
Not open for further replies.
Top