qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Default cache mode


From: Alexander Graf
Subject: Re: [Qemu-devel] Default cache mode
Date: Wed, 29 Jun 2011 14:21:07 +0200

On 29.06.2011, at 13:59, Kevin Wolf wrote:

> Hi,
> 
> I think we have touched this topic before during some IRC discussions or
> somewhere deep in a mailing list thread, but I think it hasn't been
> discussed on the list.
> 
> Our default cache mode of cache=writethrough is extremely conservative
> and provides absolute safety at the cost of performance, and most people
> don't use it if they know that it can be changed because it just
> performs too bad. There are use cases where you need it (broken guest
> OS), but none and writeback are just as correct with respect to the
> specs and they are safe to use with current OSes. And even with broken
> OSes, in many use cases it doesn't really matter if you lose a VM  and
> have to reinstall it (which is probably true even more for users
> invoking qemu directly instead of using libvirt).
> 
> I think the motivation to switch from writeback to writethrough as
> default was that writeback was entirely unsafe back then. This isn't
> true any more, so is there still enough reason to have the slow
> writethrough mode as default?
> 
> I'm not entirely sure if I should suggest writeback or none as the new
> default, but I think it could make sense to change it.

None as default would be a bad choice, as not all underlying file systems 
support it. Try cache=none on tmpfs or nfs. It will just fail on you.
What I'd personally like to see is some sort of detection that can determine 
which caching mode would perform best. So it would do cache=none when it makes 
sense (raw block device), otherwise cache=writeback.


Alex




reply via email to

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