[openstack-dev] Questions on the virtual disk's cache type

Daniel P. Berrange berrange at redhat.com
Wed Jan 23 09:30:46 UTC 2013

On Wed, Jan 23, 2013 at 03:15:03PM +0800, Liu Yuan wrote:
> Hi List,
>    I found from the nova/virt/libvirt/driver.py that we set disk cache
> mode always as 'none' for crash safety & migration correctness as
> commented. But for network volumes such as Sheepdog volume, which
> support client side cache, there is definitely use case for users that
> want to take full advantage of cache to enjoy best IO performance. So
> the question is, is there any customization for cache property? If no,
> I'd like to add the cache property capability to glance.

FYI There is a patch proposed for customization


I should note that it is wrong to assume that enabling cache mode will
improve the performance in general. Allowing caching in the host will
require a non-negligable amount of host RAM to have a benefit. RAM is
usually the most constrained resource in any virtualization environment.
So while the cache may help performance when only one or two Vms are
running on the host, it may well in fact hurt performance once the host
is running enough VMs to max out RAM. So allowing caching will actually
give you quite variable performance, while the cache=none will give you
consistent performance regardless of host RAM utilization (underlying
contention of the storage device may of course still impact things).

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the OpenStack-dev mailing list