[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [vfio-users] Speed tips requested



On Sun, Mar 26, 2017 at 4:33 AM, Patrick O'Callaghan <poc usb ve> wrote:
On Sun, 2017-03-26 at 10:58 +0100, Bronek Kozicki wrote:
> 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

Thanks. I'm already using CPU pinning as I said. The disk options are
both set to "hypervisor default" so I'll try changing them. I'd
configured the guest disk as 'raw' assuming that would be faster than
QCOW2 but I'll look into it.


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,

Alex

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]