Bhyve. Zvol vs Raw file

netamego

Dabbler
Joined
Feb 9, 2019
Messages
12
Hi,
I see behyve is growing up. Some people is migrating to bhyve from ESXi. I see some benchmarks and seems bhyve is a serious option. What i can't undersand is the actually diferences or pros and cons between use zvol or raw file. Seems that zvols have best performance but have "problems" with zfs snapshot feature because you need same free space on the pool that space on zvol to take the snapshot. Raw file instead have better support for snapshots but worse performance. Can someone explain the key differences?. Thanks a lot!!!
 

netamego

Dabbler
Joined
Feb 9, 2019
Messages
12
That's good! More people interested in the same thing! No. I haven't found reliable answer to my question.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Quoting from the documentation: https://www.ixsystems.com/documentation/freenas/11.2/virtualmachines.html#vms-raw-file

16.2.4. Raw Files
Raw Files are similar to Zvol disk devices, but the disk image comes from a file. These are typically used with existing read-only binary images of drives, like an installer disk image file meant to be copied onto a USB stick.
-----------
My text here below, not from the docs...

It's essentially the same. There are a few parameters that you can set separately from the parent dataset on a zvol, compared to a RAW file being forced to inherit from its dataset parent since it's just a file like any other.

ZVOLs are also just files stored in a special location in the filesystem, but physically on the pool/dataset where you create it. It gets special treatment per the settings you can see in the GUI when you set it up, but otherwise, it's also just a file.

ZVOLs are required in some cases, such as iSCSI to provide block storage.
 

netamego

Dabbler
Joined
Feb 9, 2019
Messages
12
Thanks a lot sretalla but i think the question require more tech explanation than what it's exposed in documentation. I read this doc before post to the forum.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I read this doc before post to the forum.
Did you read the whole of my post? everything after the line isn't from the docs (as stated there).
 

netamego

Dabbler
Joined
Feb 9, 2019
Messages
12
Sorry for that. You are right. I thought that whole your post came from the doc. Thanks for your help.
 

zizzithefox

Dabbler
Joined
Dec 18, 2017
Messages
41
It's essentially the same. There are a few parameters that you can set separately from the parent dataset on a zvol, compared to a RAW file being forced to inherit from its dataset parent since it's just a file like any other.

ZVOLs are also just files stored in a special location in the filesystem, but physically on the pool/dataset where you create it. It gets special treatment per the settings you can see in the GUI when you set it up, but otherwise, it's also just a file.

ZVOLs are required in some cases, such as iSCSI to provide block storage.

I was searching for performance comparisons between files and volumes in bhyve and stumble upon this thread.
What I can say is that I've tried both and they seem pretty much the same. I have never managed to found any identifiable performance advantage in zvol for the average case, never had any inconvenience with files.
There is one drawback with zvol: files you can move around wherever you want with minimum hassle; zvol you have to replicate.
 
Top