[openstack-dev] Questions on the virtual disk's cache type
Daniel P. Berrange
berrange at redhat.com
Wed Jan 23 11:10:59 UTC 2013
On Wed, Jan 23, 2013 at 06:09:01PM +0800, Liu Yuan wrote:
> On 01/23/2013 05:30 PM, Daniel P. Berrange wrote:
> > FYI There is a patch proposed for customization
> > https://review.openstack.org/#/c/18042/
> Seems that this patch is dropped and declined?
> > 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).
> Yeah, allowing page cache in the host might not be a good idea to run
> multiple VMs, but cache type in QEMU has different meaning for network
> block devices. For e.g, we use 'cache type' to control client side cache
> of Sheepdog cluster, which implement a object cache in the local disk
> for performance boost and reducing network traffics. This doesn't
> consume memory at all, just occupy the disk space where runs sheep daemon.
BTW, where is this local disk cache kept in the filesystem ? For proper
security isolation between VMs, the cache location needs to be different
for each VM and needs to be included in the SELinux policy.
|: 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