From: Kevin Wolf <kwolf@redhat.com>
To: lihuiba <magazine.lihuiba@163.com>
Cc: qiujian@meituan.com, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
mengcong@meituan.com
Subject: Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1
Date: Tue, 24 Jun 2014 12:15:46 +0200 [thread overview]
Message-ID: <20140624101546.GB3458@noname.redhat.com> (raw)
In-Reply-To: <225b854d.98bc.146ccc39a83.Coremail.magazine.lihuiba@163.com>
Am 24.06.2014 um 09:25 hat lihuiba geschrieben:
> >Can you confirm that making L2_CACHE_SIZE much bigger solves the
> >problem?
> Yes, it is confirmed.
> When I run fio randread with a 7GB or 8GB size, result is close to that of raw image.
> But when the size is increased to 9GB, the result drops dramatically. And I have modified
> qcow2-cache.c to print a log when cache misses. When testing the 9GB size, there are
> lots of cache misses shown.
>
> >You also have the optional of specifying the cluster size when creating
> >the qcow2 image file. A larger cluster size reduces the amount of
> >metadata overhead and therefore increases cache hits.
> I didn't find any command-line option to increase the size of the cache, so I increased
> cluster_size to 1MB or 2MB. This worked very well for me.
>
> BTW
> qemu-img of version 1.7.1 has bug when creating qcow2 image with options preallocation=metadata
> and cluster_size > 64K. It reports:
>
>
> # qemu-img create -f qcow2 -o preallocation=metadata,cluster_size=1M asdf.qcow2 100G
> Formatting 'asdf.qcow2', fmt=qcow2 size=107374182400 encryption=off cluster_size=1048576 preallocation='metadata' lazy_refcounts=off
> qemu-img: block/qcow2-cluster.c:1196: qcow2_alloc_cluster_offset: Assertion `n_start * (1ULL << 9) == offset_into_cluster(s, offset)' failed.
This appears to be fixed in current git master.
Kevin
next prev parent reply other threads:[~2014-06-24 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 2:06 [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1 lihuiba
2014-06-23 3:01 ` Fam Zheng
2014-06-23 3:14 ` lihuiba
2014-06-23 3:22 ` Fam Zheng
2014-06-23 6:20 ` lihuiba
2014-06-23 8:25 ` Stefan Hajnoczi
[not found] ` <225b854d.98bc.146ccc39a83.Coremail.magazine.lihuiba@163.com>
2014-06-24 10:15 ` Kevin Wolf [this message]
2014-06-23 7:30 ` Stefan Hajnoczi
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=20140624101546.GB3458@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=magazine.lihuiba@163.com \
--cc=mengcong@meituan.com \
--cc=qemu-devel@nongnu.org \
--cc=qiujian@meituan.com \
--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).