I decide to move my Windows 10 system from a physical environment to a Linux based virtual environment. I am curious about what is the I/O performance difference between VM image and Shared Folder. The reason why I prefer putting the data at Linux level because I can rsync the data to a different server easily. So far this is what I’ve set up:
- An i7 computer with CentOS 7 installed.
- The OS lives on a SSD drive.
- I used three 4k sectors HDDs to build a RAIDZ1 ZFS. Here are the parameters: ashift=12; compression=lz4; atime=off; redundant_metadata=most; xattr=sa; recordsize=16k
- Virtual Box v6.2
- Windows 10 was created within Virtual Box using default parameters, including dynamic VDI disk. If you really want to get the best performance, I recommend using a pre-allocated disk. However it comes with a price tag: you are going to use more disk space from your host, which you guest system may or may not use them at all. In my case, dynamic is good enough.
There are three tests I want to measure:
- 1.) Windows 10 is hosted on ZFS (recordsize=16k), and write the data within the VM image file.
- 2.) Windows 10 is hosted on SSD, and write the data within the VM image file.
- 3.) Write the data using the VirtualBox Shared Folder feature.
I used ATTO Disk Benchmark to test the IO within Windows 10. Based on my tests, of course the the SSD gives the best performance, but difference between SSD and HDD based ZFS are not that big. I guess the ZFS team must have done a lot of magical work to *simulate* the SSD performance out of low cost ordinary disks. In terms of data storage, writing data within VM image performs worse than writing data via VirtualBox Shared Folder (i.e., back to HDD based ZFS), which I am not surprise. That’s because when you write the data within the VM image, you are asking the VM to write the data within the file first, then the VM is updating the data back to the disk. There are two steps here.
Here are the screen captures from the program. Noticed that the scale of the charts are not the same. So please compare the tests using numbers only.
Test #1: Windows 10 is hosted on ZFS (recordsize=16k), and write the data within the VM image file.
Test #2: Windows 10 is hosted on SSD, and write the data within the VM image file.
Test #3: Write the data using the VirtualBox Shared Folder feature.
Hope it helps.