[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries i

From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache
Date: Thu, 5 Feb 2015 15:42:28 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Feb 05, 2015 at 03:17:19PM +0100, Kevin Wolf wrote:

> > By never allowing the hit count to go down to zero, we make sure
> > that all unused entries are chosen first before a valid one is
> > discarded.
> But does this actually improve a lot? cache_hits is only 0 for the
> first few accesses and it never becomes 0 again after that. The
> result might be that soon all the entries have cache_hits == 1, and
> we get the same problem as you're describing - only the first few
> entries will be reused.

I targeted the specific case where the size of the L2 cache is set so
that it's big enough for the whole disk.

I have a setup with a 16GB disk image and a 2MB L2 cache (that's 32
entries). If I do random rw, after two minutes I get an average of 3K
IOPS, and more than half (19) of the cache entries are still unused.

With the patch the cache fills up immediately and I get sustained ~20K
IOPS from the very beginning.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]