Hi,
I wonder if is that normal that the disk performance inside VM is so much worse than from the host system. I have two disks and two VMs, cache=writeback, iothread=1, driver VirtIO SCSI single. One disk is a 3 Gbps SATA SSD connected to P410i RAID controller (RAID0 with only one disk). Performance from host (command "hdparm -tT /dev/sda"):
/dev/sda:
Timing cached reads: 19184 MB in 1.99 seconds = 9621.66 MB/sec
Timing buffered disk reads: 722 MB in 3.01 seconds = 240.13 MB/sec
That's expected from 3Gbps disk. Now a test from VM:
/dev/sda:
Timing cached reads: 14854 MB in 1.99 seconds = 7459.21 MB/sec
Timing buffered disk reads: 724 MB in 3.01 seconds = 241.20 MB/sec
Controller performance is worse (9621->7459), but that doesn't affect disk yet. Disk performance is fine.
On the second VM I have two SATA SSDs in RAID0, so the baremetal performance is two times higher (as expected):
/dev/sdb:
Timing cached reads: 17972 MB in 1.99 seconds = 9011.92 MB/sec
Timing buffered disk reads: 1698 MB in 3.00 seconds = 565.98 MB/sec
And now the same disk from inside the VM:
/dev/sda:
Timing cached reads: 15140 MB in 1.99 seconds = 7575.27 MB/sec
Timing buffered disk reads: 1122 MB in 3.00 seconds = 373.70 MB/sec
373 MB/s instead of 565 MB/s - that's 34% worse. Why?
Best regards,
Piotr
I wonder if is that normal that the disk performance inside VM is so much worse than from the host system. I have two disks and two VMs, cache=writeback, iothread=1, driver VirtIO SCSI single. One disk is a 3 Gbps SATA SSD connected to P410i RAID controller (RAID0 with only one disk). Performance from host (command "hdparm -tT /dev/sda"):
/dev/sda:
Timing cached reads: 19184 MB in 1.99 seconds = 9621.66 MB/sec
Timing buffered disk reads: 722 MB in 3.01 seconds = 240.13 MB/sec
That's expected from 3Gbps disk. Now a test from VM:
/dev/sda:
Timing cached reads: 14854 MB in 1.99 seconds = 7459.21 MB/sec
Timing buffered disk reads: 724 MB in 3.01 seconds = 241.20 MB/sec
Controller performance is worse (9621->7459), but that doesn't affect disk yet. Disk performance is fine.
On the second VM I have two SATA SSDs in RAID0, so the baremetal performance is two times higher (as expected):
/dev/sdb:
Timing cached reads: 17972 MB in 1.99 seconds = 9011.92 MB/sec
Timing buffered disk reads: 1698 MB in 3.00 seconds = 565.98 MB/sec
And now the same disk from inside the VM:
/dev/sda:
Timing cached reads: 15140 MB in 1.99 seconds = 7575.27 MB/sec
Timing buffered disk reads: 1122 MB in 3.00 seconds = 373.70 MB/sec
373 MB/s instead of 565 MB/s - that's 34% worse. Why?
Best regards,
Piotr