qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [RFC] finegrained disk driver options control


From: Alberto Garcia
Subject: Re: [Qemu-block] [RFC] finegrained disk driver options control
Date: Mon, 20 Mar 2017 15:32:56 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Sat 18 Mar 2017 10:54:16 AM CET, Daniel P. Berrange wrote:
>> If you don't care about that at all, the optimal configuration in
>> terms of performance is to give qemu a cache large enough that the
>> metadata of the whole image fits in it. When setting
>> cache-clean-interval, this could actually be reasonable even for
>> large images because the memory wouldn't be used forever but just as
>> long as the guest is submitting the problematic I/O patterns - but it
>> still means that temporarily qemu could really use all of this
>> memory.
>
> Is there some easy algorithm that libvirt can use to determine the
> size of the L2 tables, and thus report what the maximum useful cache
> size would be ?

Yes, the disk size that can be covered with a certain L2 cache is:

   disk_size = l2_cache_size * cluster_size / 8

(all sizes in bytes)

Note that increasing the L2 cache size also increases the refcount
cache, which you might want to keep small.

It's all explained in detail here:

  https://github.com/qemu/qemu/blob/master/docs/qcow2-cache.txt
  
https://blogs.igalia.com/berto/2015/12/17/improving-disk-io-performance-in-qemu-2-5-with-the-qcow2-l2-cache/

Berto



reply via email to

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