[fedora-virt] Has something happened to virtio cache modes?

Richard W.M. Jones rjones at redhat.com
Sun Jan 27 23:40:23 UTC 2013


On Sun, Jan 27, 2013 at 05:24:29PM -0500, Cole Robinson wrote:
> On 01/27/2013 04:21 PM, Tom Horsley wrote:
> > Back around fedora 16 I tried all the different virtio
> > cache modes and experimentally discovered that
> > cache=none was nearly infinitely faster than cache=default
> > and cache=writeback was even a little faster than cache=none.
> > So I set all my VMs to cache=writeback.
> > 
> > I've been copying my virtual machine defs to each new
> > fedora since then, but now it seems to be dog slow
> > with disk IO again.
> > 
> > I'm planning to experiment with different settings again,
> > but I have to wait for my Windows XP virtual machine
> > to finish doing a windows update which may take all night
> > at the rate it is writing to disk :-(.
> > 
> > Just thought I'd ask if there is some known difference
> > in the virtio modes in fedora 18?
> 
> I know there was some fiddling with the cache mode at the qemu level,
> particularly the default was changed from writethrough to writeback. Maybe
> something regressed.
> 
> Though my understanding was that cache=none should be the faster option. Does
> that setting produce expected performance? Of course we should still figure
> out why things slowed down so much with your settings.

No: the problem with cache=none is that the host does no caching at
all, which means that the only memory available for caching is the
guest memory, and that is typically smaller than free host memory and
therefore less effective as a cache.

Anthony has a good explanation of how filesystem-level changes now
mean that other cache modes are safe (whereas they were not before):

http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02689.html

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


More information about the virt mailing list