From: Gordan Bobic <gordan@bobich.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Poor performance with qemu
Date: Thu, 08 Apr 2010 16:21:33 +0100 [thread overview]
Message-ID: <4BBDF47D.60700@bobich.net> (raw)
In-Reply-To: <4BBDEF09.70306@redhat.com>
Avi Kivity wrote:
> On 03/30/2010 03:56 PM, Chris Mason wrote:
>> On Sun, Mar 28, 2010 at 05:18:03PM +0200, Diego Calleja wrote:
>>
>>> Hi, I'm using KVM, and the virtual disk (a 20 GB file using the "raw"
>>> qemu format according to virt-manager and, of course, placed on a btrfs
>>> filesystem, running the latest mainline git) is awfully slow, no matter
>>> what OS is running inside the VM. The PCBSD installer says it's copying
>>> data at a 40-50 KB/s rate. Is someone using KVM and having better
>>> numbers
>>> than me? How can I help to debug this workload?
>>>
>> The problem is that qemu uses O_SYNC by default, which makes btrfs do
>> log commits for every write.
>>
>
> Problem is, btrfs takes the 50 KB/s guest rate and inflates it to
> something much larger (megabytes/sec). Are there plans to reduce the
> amount of O_SYNC overhead writes?
>
> I saw this too, but with 2.6.31 or 2.6.32 IIRC.
>
>> Once the O_DIRECT read patch is in, you can switch to that, or tell qemu
>> to use a writeback cache instead.
>>
>
> Even with writeback qemu will issue a lot of fsyncs.
>
My understanding was that with cache=writeback qemu shouldn't issue any
fsyncs at all, but I could be wrong.
Gordan
next prev parent reply other threads:[~2010-04-08 15:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 15:18 Poor performance with qemu Diego Calleja
2010-03-30 12:56 ` Chris Mason
2010-04-08 14:58 ` Avi Kivity
2010-04-08 15:21 ` Gordan Bobic [this message]
2010-04-08 15:26 ` Chris Mason
2010-04-08 15:28 ` Avi Kivity
2010-04-08 15:32 ` Chris Mason
2010-04-08 15:34 ` Christoph Hellwig
2010-04-08 15:36 ` Avi Kivity
2010-04-08 15:39 ` Christoph Hellwig
2010-04-08 15:32 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2010-03-29 19:21 Markus Suvanto
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=4BBDF47D.60700@bobich.net \
--to=gordan@bobich.net \
--cc=linux-btrfs@vger.kernel.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).