Bit of background… Im quite new to the world of libvirt\kvm\qemu etc and have a background in vmware.
Ive used Unraid for quite a while and they’ve recently implemented VM support via libvirt, which led me down the path of virtualising my office PC and my media centre.
My Host machine specs are: 2xXeon E5520, 24GB DDR3, 2x240GB SSD (Both on an LSI SAS 2008 controller) , 8x2TB HDD (onboard mobo controller)
Im able to set up VMs, pass through a variety of devices (Sound cards\USB controllers\Graphics cards) fine, but my windows VM (which I use as my main office PC) seems to suffer when it comes to disk performance.
On the host, the SSD performs as expected. Inside VMs I get the following (BARE METAL\VM):
Sequential Read: 510MB/s \ 460MB/s -10%
Sequential Write: 471MB/s \ 197MB/s -58%
4k Read: 28.10MB/s \ 7.55MB/s -73%
4k Write: 74.90MB/s \ 5.73MB/s -92%
4k-64threads Read: 320.30MB/s \ 215.27MB\s -33%
4k-64threads Write: 273.94MB/s \ 96.00MB\s -64%
Access time Read: 0.052ms \ 0.589ms -lots%
Access time Write: 0.051ms \ 0.899ms -lots%
While performance is acceptable (just!) on the VM, id like to get a little closer to 'bare metal' speeds. I appreciate that there will be some overhead, but it shouldn’t be this much!
My VM XML is here: http://pastebin.com/52BwffmC
So far I've experimented with:
· IOTHREADS – Assigned designated IOTHREADS to CPUs and to the disk controller (still in my XML).
· Cache and IO settings changed to: 'cache='none' io='native' ' – no performance change.
· Virtio and virtio-scsi controllers make no difference to performance.
· Controller pass through – I tried to pass through the entire LSI2008 controller, however windows refused to detect any drives (despite installing drivers during windows installation). Linux detected the drives and installation completed, however I wasn’t able to boot from the disk after the installation. Not sure how to set the LSI controller as a bootable device.
· CPU and disk schedulers changed on the host – no performance change.
Im running out of ideas on what else to tweak at this point! Would the best way for me to achieve bare metal speeds would be to have a dedicated PCIe controller passed through (2 or 4 port SATA3 controller?)? Do any exist that play nice with libvirt and can be used as a boot device?
This e-mail and its attachments, if any, contains information intended for the addressee only. It may be confidential and may be the subject of legal and/or professional privilege. If you are not the addressee you are not authorised to disseminate, distribute , copy or use this e-mail or any attachment to it. The content may be personal or contain personal opinions and unless specifically stated or followed up in writing, the content cannot be taken to form a contract or to be an _expression_ of BT Lancashire Services' position. If you receive an email in error from BT Lancashire Services please contact the sender and delete the email from your system. BT Lancashire Services reserves the right to monitor all incoming and outgoing email. BT Lancashire Services has taken reasonable steps to ensure that outgoing communications do not contain malicious software and it is your responsibility to carry out any checks on this email before accepting the email and opening attachments.
BT Lancashire Services, County Hall, Fishergate, Preston, Lancashire, PR1 8XJ. Company Number 07444626.