From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2: Default to 4KB for the qcow2 cache entry size
Date: Wed, 6 Mar 2019 11:55:41 +0100 [thread overview]
Message-ID: <20190306105541.GE6818@localhost.localdomain> (raw)
In-Reply-To: <20190213164853.32412-1-berto@igalia.com>
Am 13.02.2019 um 17:48 hat Alberto Garcia geschrieben:
> QEMU 2.12 (commit 1221fe6f636754ab5f2c1c87caa77633e9123622) introduced
> a new setting called l2-cache-entry-size that allows making entries on
> the qcow2 L2 cache smaller than the cluster size.
>
> I have been performing several tests with different cluster and entry
> sizes and all of them show that reducing the entry size (aka L2 slice)
> consistently improves I/O performance, notably during random I/O (all
> tests done with sequential I/O show similar results). This is to be
> expected because loading and evicting an L2 slice is more expensive
> the larger the slice is.
>
> Here are some numbers on fully populated 40GB qcow2 images. The
> rightmost column represents the maximum L2 cache size in both cases.
>
> Cluster size = 64 KB
> |-------------+--------------+--------------+--------------|
> | | 1MB L2 cache | 3MB L2 cache | 5MB L2 cache |
> |-------------+--------------+--------------+--------------|
> | 4KB slices | 6545 IOPS | 12045 IOPS | 55680 IOPS |
> | 16KB slices | 5177 IOPS | 9798 IOPS | 56278 IOPS |
> | 64KB slices | 2718 IOPS | 5326 IOPS | 57355 IOPS |
> |-------------+--------------+--------------+--------------|
>
> Cluster size = 256 KB
> |--------------+----------------+--------------+-----------------|
> | | 512KB L2 cache | 1MB L2 cache | 1280KB L2 cache |
> |--------------+----------------+--------------+-----------------|
> | 4KB slices | 8539 IOPS | 21071 IOPS | 55417 IOPS |
> | 64KB slices | 3598 IOPS | 9772 IOPS | 57687 IOPS |
> | 256KB slices | 1415 IOPS | 4120 IOPS | 58001 IOPS |
> |--------------+----------------+--------------+-----------------|
>
> As can be seen in the numbers, the only exception to the rule is when
> the cache is large enough to hold all L2 tables. This is also to be
> expected because in this case no cache entry is ever evicted so
> reducing its size doesn't bring any benefit.
>
> This patch sets the default L2 cache entry size to 4KB except when the
> cache is large enough for the whole disk.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2019-03-06 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 16:48 [Qemu-devel] [PATCH] qcow2: Default to 4KB for the qcow2 cache entry size Alberto Garcia
2019-03-05 15:36 ` Alberto Garcia
2019-03-06 10:55 ` Kevin Wolf [this message]
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=20190306105541.GE6818@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berto@igalia.com \
--cc=mreitz@redhat.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).