Use /dev/rdiskX instead of /dev/diskX for physical hard disk to make disk IO 10x faster.

Discussion in 'Parallels Desktop for Mac Feature Suggestions' started by YanzheL, Aug 22, 2019.

  1. YanzheL

    YanzheL Bit poster

    Currently, when we add a physical hard disk to VM, Parallels opens /dev/diskX by default.
    I can observe this behavior by inspecting open files list in Activity Monitor. It shows that the VM process opens /dev/disk4 in my case.
    However, the performance of /dev/diskX is quite poor according to
    You can easily see the significant performance difference by using "dd" command to write on /dev/rdiskX and /dev/diskX respectively.
    So I suggest to use /dev/rdiskX by default when using physical hard disk.

    Test case
    Version: Parallels Desktop Pro for Mac 15
    Host: Macbook Pro 2019 high profile model, macOS 10.14.6
    Guest: Windows 10 1903, with parallels guest tools installed.

    I have an external NVMe enclosure with USB Type-C 3.1 gen 2 connector. The SSD inside the enclosure is Samsung 960 pro, which included a preinstalled Windows 10 using Windows to Go.
    Then I created the VM, choosing this external physical drive as boot drive. The guest OS booted as expected, everything works well.
    So I perform a disk speed test using "AS SSD Benchmark" software in guest OS. It shows the sequential read is 100-150MB/s, write is 120MB+/s, which is unusual since the normal sequential read/write speed of this external NVMe drive over a USB 3.1 port is around 900MB+/s and 700MB/s.

    If I boot the disk on a linux host with QEMU-KVM(Guest VirtIO drivers installed), the sequential IO benchmark result inside guest OS is around 600-700MB/s read and 400-500MB/s write. I haven't tested it on macOS host with QEMU.

    I tried to change the disk location option in advanced settings to NVME/SCSI/SATA, but it doesn't seem to make a noticeable impact on IO speed inside the guest, so I inspect the opened files list of the VM process via Activity Monitor, and it confirms that Parallels VM opens /dev/disk4.
    /dev/disk4 is the external NVMe drive mentioned above.

    Maybe the poor disk IO performance inside guest is caused by using /dev/diskX? How do I change it to /dev/rdiskX manually? I didn't see any setting related to it in config.pvs file.
    MatthewR20, meermanr and DaleE like this.
  2. YanzheL

    YanzheL Bit poster

    I also tried to set <Passthrough>1</Passthrough> in <Hdd> section in config.pvs file, but it doesn't help.

Share This Page