On Sat, Jun 07, 2014 at 11:22:10AM -0400, Kanwar Ranbir Sandhu wrote: > On Sat, 2014-06-07 at 12:33 +0100, Richard W.M. Jones wrote: > > In any case, cache='none' (ie. O_DIRECT) won't work, and you shouldn't > > use it for throwaway test machines anyway. Since tmpfs always > > disappears at reboot, any machine you create on a tmpfs is a throwaway > > one, whether you intended that or not! > > > > Use cache='unsafe' on tmpfs. > > > > (This advice applies to libguestfs, virt-builder, etc too) > > > > For more info on caching modes, see: > > http://rwmj.wordpress.com/2013/09/02/new-in-libguestfs-allow-cache-mode-to-be-selected/ > > > Does the type of storage being used for the KVM (e.g. LVM, a file, etc.) > change which cache mode should be employed?
There's no hard rule. You need to test realistic workloads to find out which is best on your hardware. > I ask because this page > says if raw volumes or partitions are used, the cache should be set to > "none": > > http://www.linux-kvm.org/page/Tuning_KVM > > Does that still hold true? There is one pretty big reason to use cache=none, even though its performance is fairly terrible: Live migration is not possible unless you use cache='none'. http://wiki.qemu.org/Migration/Storage Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW _______________________________________________ virt mailing list virt@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/virt