From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tvF-0005ru-NU for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:52:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tvE-0001Ll-IE for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:52:41 -0400 Message-ID: <5571C5BD.2080804@redhat.com> Date: Fri, 05 Jun 2015 17:52:29 +0200 From: Max Reitz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/4] docs: document how to configure the qcow2 L2/refcount caches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi On 02.06.2015 14:22, Alberto Garcia wrote: > QEMU has options to configure the size of the L2 and refcount > caches for the qcow2 format. However, choosing the right sizes for > a particular disk image is not a straightforward operation since > the ratio between the cache size and the allocated disk space is > not obvious and depends on the size of the cluster and the refcount > entries. > > This document attempts to give an overview of both caches and how to > configure their sizes. > > Signed-off-by: Alberto Garcia > Cc: Max Reitz > --- > docs/qcow2-cache.txt | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 163 insertions(+) > create mode 100644 docs/qcow2-cache.txt > > diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt > new file mode 100644 > index 0000000..7476f73 > --- /dev/null > +++ b/docs/qcow2-cache.txt > @@ -0,0 +1,163 @@ [snip] > +Reducing the memory usage > +------------------------- > +It is possible to clean unused cache entries in order to reduce the > +memory usage during periods of low I/O activity. > + > +The parameter "cache-clean-interval" defines an interval (in seconds) > +after which all unused cache entries are removed from memory. > + > +This example removes all unused cache entries every 15 minutes: > + > + -drive file=hd.qcow2,cache-clean-interval=900 > + > +If unset, the default value for this parameter is 0 and it disables > +this feature. > + > +Note that this functionality currently relies on the MADV_DONTNEED > +argument for madvise() to actually free the memory, so it is not > +useful in systems that don't follow that behavior. I'd like a definition of what "unused" means (I know because of this series, but I wouldn't know just from this document). Max