Received: from eggs.gnu.org ([2001:4830:134:3::10]:33575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwWHj-0004lO-A8 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 11:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwWHf-000275-CY for qemu-devel@nongnu.org; Tue, 18 Oct 2016 11:26:35 -0400 From: Alberto Garcia In-Reply-To: References: <70fbc326-29b6-ca3c-54ed-201b46d71cf0@larkmoor.net> <20161007081432.GA4589@noname.redhat.com> <0d48ef17-e8bc-40bc-40ca-eb1ca6d07902@fhmtech.com> Date: Tue, 18 Oct 2016 17:25:49 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ed Swierk , Frank Myhr Cc: Kevin Wolf , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz On Fri 07 Oct 2016 03:58:29 PM CEST, Ed Swierk wrote: >> I know the disk image size, and can set cache size in >> bytes. l2-cache-size=max would be a convenience feature, *especially >> if it could become the default*. Then I could forget thinking about >> whether the image is larger than the current 8GB fully-cached >> threshold, and only have to calculate cache size in bytes in case of >> very large images, multiple backing files, or very tight memory. > > Same here, using libvirt. l2-cache-size=max would be ideal. Or if > there were a cache-coverage-size option that takes an absolute number, > libvirt could set it to the image size. I can see the benefit of both approaches: setting the disk size covered by the cache or setting a percentage, I personally like a bit more the former but it wouldn't provide a way to say "create the largest cache needed for this disk". Would 'l2-cache-coverage-size' work for everyone? It would simply take the disk size (16G, 1T, etc) and it would conflict with l2-cache-size. Do we need something similar for the refcount cache? Berto