From: "K. Richard Pixley" <rich@noir.com>
To: Josef Bacik <josef@redhat.com>
Cc: Tomasz Chmielewski <mangoo@wpkg.org>,
linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org,
hch@infradead.org, gg.mariotti@gmail.com,
"Justin P. Mattock" <justinmattock@gmail.com>,
mjt@tls.msk.ru, tytso@mit.edu
Subject: Re: BTRFS: Unbelievably slow with kvm/qemu
Date: Mon, 30 Aug 2010 08:59:37 -0700 [thread overview]
Message-ID: <4C7BD569.9000702@noir.com> (raw)
In-Reply-To: <20100830001441.GA838@dhcp231-156.rdu.redhat.com>
On 8/29/10 17:14 , Josef Bacik wrote:
> On Sun, Aug 29, 2010 at 09:34:29PM +0200, Tomasz Chmielewski wrote:
>> Christoph Hellwig wrote:
>>> There are a lot of variables when using qemu.
>>>
>>> The most important one are:
>>>
>>> - the cache mode on the device. The default is cache=writethrough,
>>> which is not quite optimal. You generally do want to use cache=none
>>> which uses O_DIRECT in qemu.
>>> - if the backing image is sparse or not.
>>> - if you use barrier - both in the host and the guest.
>> I noticed that when btrfs is mounted with default options, when writing
>> i.e. 10 GB on the KVM guest using qcow2 image, 20 GB are written on the
>> host (as measured with "iostat -m -p").
>>
>> With ext4 (or btrfs mounted with nodatacow), 10 GB write on a guest
>> produces 10 GB write on the host
> Whoa 20gb? That doesn't sound right, COW should just mean we get quite a bit of
> fragmentation, not write everything twice. What exactly is qemu doing? Thanks,
Make sure you build your file system with "mkfs.btrfs -m single -d
single /dev/whatever". You may well be writing duplicate copies of
everything.
--rich
next prev parent reply other threads:[~2010-08-30 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-29 19:34 BTRFS: Unbelievably slow with kvm/qemu Tomasz Chmielewski
2010-08-30 0:14 ` Josef Bacik
2010-08-30 15:59 ` K. Richard Pixley [this message]
2010-08-31 21:46 ` Mike Fedyk
2010-08-31 22:01 ` K. Richard Pixley
[not found] ` <4C7D7B14.9020008@noir.com>
2010-09-02 0:18 ` Ted Ts'o
2010-09-02 16:36 ` K. Richard Pixley
[not found] ` <4C7FD2AA.8090302@noir.com>
2010-09-02 16:49 ` K. Richard Pixley
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=4C7BD569.9000702@noir.com \
--to=rich@noir.com \
--cc=gg.mariotti@gmail.com \
--cc=hch@infradead.org \
--cc=josef@redhat.com \
--cc=justinmattock@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mangoo@wpkg.org \
--cc=mjt@tls.msk.ru \
--cc=tytso@mit.edu \
/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).