qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Tristan Wibberley <tristan.wibberley@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-nbd very slow, patch available
Date: Wed, 12 Sep 2012 12:00:09 +0200	[thread overview]
Message-ID: <50505D29.7020003@redhat.com> (raw)
In-Reply-To: <CADBfAviS0evHmYrRK7FBbtM20baNsnMG9G6HCD=fVjLKmiptpg@mail.gmail.com>

Il 12/09/2012 10:25, Tristan Wibberley ha scritto:
> The attached diff adds a commandline option "--cache=" with four modes
> and makes no change to the default behaviour of qemu-nbd:
> 
>   --cache=writethrough [default, O_DSYNC, very slow, very resilient]
>   --cache=off [same as --nocache, O_DIRECT, slow, resilient]
>   --cache=none [O_DIRECT, O_DSYNC, very very slow, very very resilient]
>   --cache=writeback [fast, not resilient]

A very similar patch is in QEMU 1.2.0, just released last week. :)

  --cache=writethrough [default, O_DSYNC]
  --cache=none [same as --nocache, O_DIRECT]
  --cache=directsync [O_DIRECT, O_DSYNC]
  --cache=writeback

> I have not included Stephane's extra fsync operation on close because
> that would make --cache=writeback very slow on disconnect. Users can
> sync after disconnect via alternatives available on their platform.

An fsync is already done by bdrv_close; however, this only syncs just
before qemu-nbd exits, not after each and every disconnect.  I think
it's a good compromise.  The best solution would be to add support for
fsync in the NBD kernel driver, so that --cache=writeback would be just
as good.

Paolo

      reply	other threads:[~2012-09-12 10:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  8:25 [Qemu-devel] qemu-nbd very slow, patch available Tristan Wibberley
2012-09-12 10:00 ` Paolo Bonzini [this message]

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=50505D29.7020003@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tristan.wibberley@gmail.com \
    /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).