[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache |
Date: |
Thu, 23 Apr 2015 11:15:04 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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
pgpY9eoW5ztR_.pgp
Description: PGP signature
- [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Alberto Garcia, 2015/04/21
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Stefan Hajnoczi, 2015/04/22
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Alberto Garcia, 2015/04/22
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache,
Stefan Hajnoczi <=
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Alberto Garcia, 2015/04/23
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Stefan Hajnoczi, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Kevin Wolf, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Kevin Wolf, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Alberto Garcia, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Stefan Hajnoczi, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Alberto Garcia, 2015/04/24
- Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache, Kevin Wolf, 2015/04/24