From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache
Date: Wed, 22 Apr 2015 11:26:02 +0100 [thread overview]
Message-ID: <20150422102602.GA20029@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1429629639-14328-1-git-send-email-berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
On Tue, Apr 21, 2015 at 06:20:39PM +0300, Alberto Garcia wrote:
> Large disk images need large L2 caches in order to maximize their
> I/O performance. However setting a correct size for the cache is not
> necessarily easy since apart from the image size, it also depends
> on other factors like its usage patterns or whether it's part of a
> backing chain.
>
> In order to be able to set a very large cache size to cover the
> worst-case scenarios and yet prevent an unnecessary waste of memory,
> this patch modifies the qcow2 cache algorithm so the memory for each
> entry is allocated only when it's actually needed.
>
> This also improves the scenarios with smaller images: the current
> default L2 cache size can map a whole 8GB disk, so those smaller than
> that are allocating cache memory that can never be used.
What measurable improvement does this patch make?
Buffers allocated upfront are not touched, so they don't actually
consume physical memory.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-04-22 10:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 15:20 [Qemu-devel] [PATCH] qcow2: do lazy allocation of the L2 cache Alberto Garcia
2015-04-22 10:26 ` Stefan Hajnoczi [this message]
2015-04-22 14:37 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-04-23 10:15 ` Stefan Hajnoczi
2015-04-23 11:50 ` Alberto Garcia
2015-04-24 9:26 ` Stefan Hajnoczi
2015-04-24 9:45 ` Kevin Wolf
2015-04-24 9:52 ` Kevin Wolf
2015-04-24 11:10 ` Alberto Garcia
2015-04-24 12:37 ` Stefan Hajnoczi
2015-04-24 12:50 ` Alberto Garcia
2015-04-24 13:04 ` Kevin Wolf
2015-05-08 9:00 ` Alberto Garcia
2015-05-08 9:47 ` Kevin Wolf
2015-05-08 11:47 ` Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150422102602.GA20029@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=berto@igalia.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).