qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache
Date: Thu, 23 Apr 2015 11:15:04 +0100	[thread overview]
Message-ID: <20150423101504.GG8811@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <w51618oxm90.fsf@maestria.local.igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

On Wed, Apr 22, 2015 at 04:37:15PM +0200, Alberto Garcia wrote:
> On Wed 22 Apr 2015 12:26:02 PM CEST, Stefan Hajnoczi 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.
> 
> For a cache size of 128MB, the PSS is actually ~10MB larger without the
> patch, which seems to come from posix_memalign().

Do you mean RSS or are you using a tool that reports a "PSS" number that
I don't know about?

We should understand what is going on instead of moving the code around
to hide/delay the problem.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-23 10:15 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 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-22 14:37   ` Alberto Garcia
2015-04-23 10:15     ` Stefan Hajnoczi [this message]
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=20150423101504.GG8811@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=berto@igalia.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).