<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Mar 26, 2017 at 4:33 AM, Patrick O'Callaghan <span dir="ltr"><<a href="mailto:poc@usb.ve" target="_blank">poc@usb.ve</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, 2017-03-26 at 10:58 +0100, Bronek Kozicki wrote:<br>
> Assuming you use libvirt, make sure to use vCPU pinning. For disk access, try cache='writeback' io='threads'. If you switch to scsio-vfio, this will give you the ability to define queue length which might additionally improve IO. Also, try QCOW2 format for guest disk, it might enable some additional optimizations. However given you host seem to have little spare capacity, YMMV<br>
<br>
</span>Thanks. I'm already using CPU pinning as I said. The disk options are<br>
both set to "hypervisor default" so I'll try changing them. I'd<br>
configured the guest disk as 'raw' assuming that would be faster than<br>
QCOW2 but I'll look into it.</blockquote><div><br></div><div><br></div><div>Generally the recommendation is to use raw (not sparse), LVM, or a block device for the best performance.  QCOW is never going to be as fast as these at writing unused blocks since it needs to go out and allocate new blocks from the underlying file system when this happens.  QCOW is generally recommended when on disk image size is a concern or you want advanced features like backing images, snapshots, etc.  I think real world performance of QCOW is noticeably worse than the recommended image types.  Also, be careful with caching, it's easy to get into a situation where the benchmark shows it to be great, sometime unbelievably so, but perhaps at the cost of safe operation or to the determent of overall system behavior.  For example, do you really want to sacrifice buffer cache in the host for the benefit of the guest.  Thanks,</div><div><br></div><div>Alex</div></div></div></div>