[Top][All Lists]

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

[Qemu-discuss] Clarification about disk cache options

From: Andrew Martin
Subject: [Qemu-discuss] Clarification about disk cache options
Date: Fri, 8 Aug 2014 13:23:07 -0500 (CDT)


I am running several virtualization servers with QEMU 1.4.x and libvirt 1.0.2 
on Ubuntu 12.04 and am working on optimizing the cache= and aio= options for 
the virtual machines. These VM images are mostly qcow2, and are served both 
from a local ext4 filesystem (with data=ordered,barrier) and from an NFS 
mountpoint (with sync). The local filesystem sits on top of an md software RAID 

I have read some conflicting information about which cache option is used by 
default. This documentation states that cache=writethrough is the default:

However this SuSE documentation claims that QEMU 1.2.x and newer allows the 
driver to select which cache mode, and it often defaults to cache=writeback:

Which is correct? How is the cache mode set by default (if cache= is not 

My second question is can cache=none be used safely on a local ext4 filesystem 
with no BBU? Since ext4 uses barriers, would writing to these qcow2 image files 
be safe? The kernel documentation about barriers states that "Write barriers 
enforce proper on-disk ordering of journal commits, making volatile disk write 
caches safe to use, at some performance penalty". Does this apply to qcow2 VM 


Andrew Martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]