-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpectedly low performance of VMs with openzfsonosx backing store #791
Comments
Well, running virtual machines from spinning disks is always very slow. If you have the opportunity to run them from a SSD try it and you will see the difference. Running from a mirrored pair doesn't give you better performance, because VMs change constantly while in execution, so the small gain you could have in speed while reading from both SATA drives is lost in the constant writing to disk. |
You haven't told us anything about versions ("zpool version") or whether you're in a dataset, what compression and checksum algorithm you're using, and so forth, so it's hard to pin down what might be at the root of your performance problem. That said, our mmap performance in datasets is far from great. You might try moving your VMs into a zvol instead:
This creates an APFS volume named "VMVOL" into which you can copy your VMs, using the zvol as a source. You can experiment with volblocksize - you are likely to get different (not necessarily better) performance as you change the powers-of-two down (4k,8k) or up (32k,64k,128k). It's hard to estimate because lz4 is on modern mac systems is very very fast and the msync() calls from the VM software are sufficiently rare (and handled by the APFS code rather than by our code) that larger volblocks aren't partially-rewritten very often, so there can be a performance gain from larger volblocks. If the performance of your VMs stored in a zvol rather than a dataset is better (or worse), please add a note to this discussion. |
I have a mirrored pair of regular SATA drives in a thunderbolt enclosure under Mojave. I try to run virtual machines from them. Machines that may run under Virtualbox or VMWare Fusion. They run like elderly turtles with arthritis. Copying outside the virtual machine seems fine. It's that there's some interaction between the virtual machine environment and Mac ZFS that seems to be gimping them.
The text was updated successfully, but these errors were encountered: