qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: phoeagon <phoeagon@gmail.com>
To: Stefan Weil <sw@weilnetz.de>, Paolo Bonzini <pbonzini@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4] block/vdi: Use bdrv_flush after metadata updates
Date: Sun, 10 May 2015 16:05:33 +0000	[thread overview]
Message-ID: <CAKYApDD49m3e0teps6zPLFT8Mc4tbhCxf2iKB4nbyf66HDM=Xw@mail.gmail.com> (raw)
In-Reply-To: <554F8117.1070800@weilnetz.de>

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

Just for clarity, I was not writing to tmpfs. I was READING from tmpfs. I
was writing to a path named 'sdb' (as you see in the prompt) which is a
btrfs on an SSD Drive. I don't have an HDD to test on though.

On Mon, May 11, 2015 at 12:02 AM Stefan Weil <sw@weilnetz.de> wrote:

> Am 10.05.2015 um 17:01 schrieb Paolo Bonzini:
> >
> > On 09/05/2015 05:54, phoeagon wrote:
> >> zheq-PC sdb # time ~/qemu-sync-test/bin/qemu-img convert -f raw -t
> writeback -O vdi /run/shm/rand 1.vdi
> >>
> >> real0m8.678s
> >> user0m0.169s
> >> sys0m0.500s
> >>
> >> zheq-PC sdb # time qemu-img convert -f raw -t writeback -O vdi
> /run/shm/rand 1.vdi
> >> real0m4.320s
> >> user0m0.148s
> >> sys0m0.471s
> > This means that 3.83 seconds are spent when bdrv_close() calls
> > bdrv_flush().  That's the only difference between writeback
> > and unsafe in qemu-img convert.
> >
> > The remaining part of the time (4.85 seconds instead of 0.49
> > seconds) means that, at least on your hardware, sequential writes
> > to unallocated space become 10 times slower with your patch.
> >
> > Since the default qemu-img convert case isn't slowed down, I
> > would think that correctness trumps performance.  Nevertheless,
> > it's a huge difference.
> >
> > Paolo
>
> I doubt that the convert case isn't slowed down.
>
> Writing to a tmpfs as it was obviously done for the test is not a
> typical use case.
> With real hard disks I expect a significant slowdown.
>
> Stefan
>
>

[-- Attachment #2: Type: text/html, Size: 1910 bytes --]

  reply	other threads:[~2015-05-10 16:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  4:04 [Qemu-devel] [PATCH v3] block/vdi: Use bdrv_flush after metadata updates Zhe Qiu
2015-05-07 10:09 ` Stefan Hajnoczi
2015-05-07 15:05 ` [Qemu-devel] [Qemu-block] " Eric Blake
2015-05-07 15:16 ` [Qemu-devel] [PATCH v4] " Zhe Qiu
2015-05-08 13:14   ` Max Reitz
2015-05-08 13:55     ` Kevin Wolf
2015-05-08 14:43       ` phoeagon
2015-05-08 21:26       ` Stefan Weil
2015-05-09  3:54         ` phoeagon
2015-05-09  3:59           ` phoeagon
2015-05-09  6:39             ` Stefan Weil
2015-05-09  7:41               ` phoeagon
2015-05-10 15:01           ` Paolo Bonzini
2015-05-10 16:02             ` Stefan Weil
2015-05-10 16:05               ` phoeagon [this message]
2015-05-10 16:10               ` Paolo Bonzini
2015-05-10 16:26                 ` Stefan Weil
2015-05-10 17:14                   ` phoeagon
2015-05-08 10:43 ` [Qemu-devel] [Qemu-block] [PATCH v3] " Kevin Wolf
2015-05-08 11:50   ` phoeagon
2015-05-08 12:02     ` Kevin Wolf
2015-05-08 12:56       ` phoeagon
2015-05-08 13:10 ` [Qemu-devel] " Max Reitz

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='CAKYApDD49m3e0teps6zPLFT8Mc4tbhCxf2iKB4nbyf66HDM=Xw@mail.gmail.com' \
    --to=phoeagon@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).