[libvirt] [PATCH] set cache=off on -disk line in qemu driver if <shareable/> (but not <readonly/>) is set.

As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior. Comments?

On Sat, Nov 01, 2008 at 06:20:27PM -0500, Charles Duffy wrote:
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior.
Yes, I believe you are correct. On a single host our current setup is sufficient, but if several VMs on different hosts are accessing the same underlying shared storage, then we do need to disable the caching of reads. So cache=off for <shared> disks is the safest option. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Sat, Nov 01, 2008 at 06:20:27PM -0500, Charles Duffy wrote:
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior.
Comments?
Yes that sounds right, if shared over network we should not cache locally in the OS, applied and commited, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Sat, Nov 01, 2008 at 06:20:27PM -0500, Charles Duffy wrote:
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior.
Comments?
Yes that sounds right, if shared over network we should not cache locally in the OS,
applied and commited,
thanks !
Daniel cache=off should be the default case (or the similar O_DSYNC case). cache=on should only be used for temporal usage and not really
Daniel Veillard wrote: production data. It's just unsafe to use caching if you data is important to you. It's a hot issue in the qemu mailing list. Cheers, Dor

On Mon, Nov 03, 2008 at 06:37:45PM +0200, Dor Laor wrote:
On Sat, Nov 01, 2008 at 06:20:27PM -0500, Charles Duffy wrote:
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior.
Comments?
Yes that sounds right, if shared over network we should not cache locally in the OS,
applied and commited,
thanks !
Daniel cache=off should be the default case (or the similar O_DSYNC case). cache=on should only be used for temporal usage and not really
Daniel Veillard wrote: production data. It's just unsafe to use caching if you data is important to you. It's a hot issue in the qemu mailing list.
My POV at the moment is that whatever safe default need to be should be set in QEmu, and in libvirt we should allow to override the default. I'm still waiting for the battle to end in QEmu, unfortunately I don't really see a consensus, but I lost track a couple of weeks ago :-) The patch looked okay because the fs is labelled as shared in the XML config, so really that's user provided informations that a default check in QEmu can't guess, hence overriding the default QEmu options makes sense IMHO. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Mon, Nov 03, 2008 at 06:37:45PM +0200, Dor Laor wrote:
On Sat, Nov 01, 2008 at 06:20:27PM -0500, Charles Duffy wrote:
As cache=off is necessary for clustering filesystems such as GFS (and such is the point of shareable, yes?), I believe this is correct behavior.
Comments?
Yes that sounds right, if shared over network we should not cache locally in the OS,
applied and commited,
thanks !
Daniel cache=off should be the default case (or the similar O_DSYNC case). cache=on should only be used for temporal usage and not really
Daniel Veillard wrote: production data. It's just unsafe to use caching if you data is important to you. It's a hot issue in the qemu mailing list.
I was under the impression its already been solved on qemu mailing list. AFAIK, they changed the defalt option to ensure data safety upon host crash, so we have no need to set any cache= option by default. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (4)
-
Charles Duffy
-
Daniel P. Berrange
-
Daniel Veillard
-
Dor Laor