[libvirt] [PATCH v4 1/2] conf, docs: Add qcow2 cache configuration support

Peter Krempa pkrempa at redhat.com
Wed Sep 13 11:20:03 UTC 2017


On Wed, Sep 13, 2017 at 17:21:23 +0800, Liu Qing wrote:
> Random write IOPS will drop dramatically if qcow2 l2 cache could not
> cover the whole disk. This patch gives libvirt user a chance to adjust
> the qcow2 cache configuration.
> 
> Three new qcow2 driver parameters are added. They are l2-cache-size,
> refcount-cache-size and cache-clean-interval.
> 
> The following are from qcow2-cache.txt.
> The amount of virtual disk that can be mapped by the L2 and refcount
> caches (in bytes) is:
> disk_size = l2_cache_size * cluster_size / 8
> disk_size = refcount_cache_size * cluster_size * 8 / refcount_bits
> 
> The parameter "cache-clean-interval" defines an interval (in seconds).
> All cache entries that haven't been accessed during that interval are
> removed from memory.
> 
> Signed-off-by: Liu Qing <liuqing at huayun.com>
> ---
> Change since v3: a) copy qcow2 cache configurion from source to backing$
>                     to backing file source.$

This looks like one of the tuning parameters which really is hard for
users to set and thus it should be justified properly if we need it. [1]

From the commit message above it looks like that there are guidelines
how to set them. Can't we just make them implicit and not expose
anything to tune the settings? Does it make sense to do so? Are there
any drawbacks?

If any of them need to be configured by the user, please describe that
in detail why it's necessary.

Peter

[1] There's discussion I can link to for other tuning parameters. The
gist is that allowing users to set something withoug giving them
guidance is pointless since they might not use it. Also if the guidance
is strict (e.g. a formula, libvirt or qemu should set the defaults
properly and not force users to do the calculation)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170913/a8910567/attachment-0001.sig>


More information about the libvir-list mailing list