From: Stefan Hajnoczi <stefanha@gmail.com>
To: Chunyan Liu <cyliu@suse.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-img create: set "nocow" flag to solve performance issue on btrfs
Date: Thu, 26 Sep 2013 09:58:43 +0200 [thread overview]
Message-ID: <20130926075843.GC24531@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CAERYnoZJ0cV9CVH3J2zGwa2h5vyDG=ATpBD45Jhqs9Q6qq24WA@mail.gmail.com>
On Wed, Sep 25, 2013 at 02:38:36PM +0800, Chunyan Liu wrote:
> Btrfs has terrible performance when hosting VM images, even more when the
> guest in those VM are also using btrfs as file system.
> One way to mitigate this bad performance would be to turn off COW
> attributes on VM files (since having copy on write for this kind of data is
> not useful). We could improve qemu-img to ensure they flag newly created
> images as "nocow". For those who want to use Copy-on-write (for
> snapshotting, to share snapshots across VM, etc..) could be able to change
> this behaviour by 'chattr', either globally or per VM.
The full implications of the NOCOW attribute aren't clear to me. Does
it really mean the file cannot be snapshotted? Or is it purely a data
integrity issue where overwriting data in-place puts that data at risk
in case of hardware/power failure?
> I wonder could we add a patch to improve qemu-img create, to set 'nocow'
> flag by default on newly created images?
I think that would be fine. It's a ioctl(FS_IOC_SETFLAGS, FS_NOCOW_FL)
call so not even too btrfs-specific.
Stefan
next prev parent reply other threads:[~2013-09-26 7:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 6:38 [Qemu-devel] qemu-img create: set "nocow" flag to solve performance issue on btrfs Chunyan Liu
2013-09-26 7:58 ` Stefan Hajnoczi [this message]
2013-09-26 8:54 ` Paolo Bonzini
2013-09-26 10:30 ` Chunyan Liu
2013-09-26 16:56 ` Paolo Bonzini
2013-09-27 8:58 ` Chun Yan Liu
2013-09-27 9:02 ` Paolo Bonzini
2013-09-26 9:04 ` Chunyan Liu
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=20130926075843.GC24531@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=cyliu@suse.com \
--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).