From: Max Reitz <mreitz@redhat.com>
To: Erik Rull <erik.rull@rdsoftware.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Comparison of virtual disks?
Date: Mon, 04 May 2015 13:14:33 +0200 [thread overview]
Message-ID: <55475499.1040708@redhat.com> (raw)
In-Reply-To: <5545D979.1090303@rdsoftware.de>
[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]
On 03.05.2015 10:16, Erik Rull wrote:
> Hi all,
>
> is there a comparison chart of the different disk formats supported by
> QEMU? Especially throughput, latencies and robustness against
> unexpected power loss on the host would be interesting.
>
> Thanks a lot.
>
> Best regards,
>
> Erik
Hi Erik,
I'm sorry, but I don't know whether such a chart exists (the closest
thing I know is http://en.wikipedia.org/wiki/Category:Disk_images -
which is not very close...). However, the general assumption we as
developers are working with is that if the user's top priority is
performance, they should use raw; and if they want to use all of the
features qemu's block layer provides, they should use qcow2. All other
formats are implemented merely for compatibility and ideally they should
not be used for running VMs, but only for converting them to qcow2 using
qemu-img convert.
Especially considering performance (throughput and latency), qcow2 will
probably be the only format that we are really willing to work on. For
the other drivers, the general idea is that "reasonably fast" is enough,
but we probably won't go out of our way to make the implementations as
fast as possible.
On the other hand, other formats may support special raw-like operating
modes (e.g. vpc does), making them potentially automatically as fast as
raw is, if configured appropriately.
Finally, there is robustness: raw will be as robust as it gets, because
it should behave just like a real disk. For qcow2, we took special care
to make sure the image will not be corrupted if qemu or the host crash.
There are options like cache=unsafe and lazy-refcounts=on, which may
corrupt the image in case of a crash, but at least the latter results in
a special flag being set which makes qemu check and, if need be, repair
the image the next time it is used. Speaking of checking and repairing,
that's something that is only really implemented for qcow2, too. From
what I can see, qed supports it, too; vdi and vmdk only support checking
(I don't know how thorough it is); and vhdx has a journal which I guess
means it is pretty safe against unexpected crashes, too.
We are trying to make all formats resistent against unexpected crashes
(by flushing metadata whenever necessary), but I think it is safe to say
here too we are paying special attention to qcow2.
So, all in all, raw is the format of choice if all you need is
performance; if you do need features not offered by raw, qcow2 (the
"QEMU image format") is the recommended choice. Or, to quote qemu-img's
manpage: "For running VMs, it is recommended to convert the disk images
to either raw or qcow2 in order to achieve good performance."
Again, sorry I don't have a full chart to present to you.
Max
Konsole output
[-- Attachment #2: Type: text/html, Size: 3614 bytes --]
next prev parent reply other threads:[~2015-05-04 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 8:16 [Qemu-devel] Comparison of virtual disks? Erik Rull
2015-05-04 11:14 ` Max Reitz [this message]
2015-05-04 12:27 ` Paolo Bonzini
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=55475499.1040708@redhat.com \
--to=mreitz@redhat.com \
--cc=erik.rull@rdsoftware.de \
--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).