Re: [libvirt] PATCH: Disable QEMU drive caching

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

 



Daniel P. Berrange wrote:
On Wed, Oct 08, 2008 at 11:06:27AM -0500, Anthony Liguori wrote:
Sorry, it was mistakenly private - fixed now.
Xen does use O_DIRECT for paravirt driver case  - blktap is using the combo
of AIO+O_DIRECT.

You have to use O_DIRECT with linux-aio. And blktap is well known to have terrible performance. Most serious users use blkback/blkfront and blkback does not avoid the host page cache. It maintains data integrity by passing through barriers from the guest to the host. You can approximate this in userspace by using fdatasync.

The issue the bug addresses, iozone performs better than native, can be addressed in the following way:

1) For IDE, you have to disable write-caching in the guest. This should force an fdatasync in the host. 2) For virtio-blk, we need to implement barrier support. This is what blkfront/blkback do. 3) For SCSI, we should support ordered queuing which would result in an fdatasync when barriers are injected.

This would result in write performance being what was expected in the guest while still letting the host coalesce IO requests, perform scheduling with other guests (while respecting each guest's own ordering requirements).

Regards,

Anthony LIguori

QEMU code is only used for the IDE emulation case which isn't interesting from a performance POV.

Daniel

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]