qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Nir Soffer <nirsof@gmail.com>
Cc: Nir Soffer <nsoffer@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	qemu-stable@nongnu.org
Subject: Re: [PATCH] qemu-nbd: Change default cache mode to writeback
Date: Mon, 16 Aug 2021 10:50:28 -0500	[thread overview]
Message-ID: <20210816155028.6rfmuxpdmc6yniit@redhat.com> (raw)
In-Reply-To: <20210813205519.50518-1-nsoffer@redhat.com>

On Fri, Aug 13, 2021 at 11:55:19PM +0300, Nir Soffer wrote:
> Both qemu and qemu-img use writeback cache mode by default, which is
> already documented in qemu(1). qemu-nbd uses writethrough cache mode by
> default, and the default cache mode is not documented.
> 
> According to the qemu-nbd(8):
> 
>    --cache=CACHE
>           The  cache  mode  to be used with the file.  See the
>           documentation of the emulator's -drive cache=... option for
>           allowed values.
> 
> qemu(1) says:
> 
>     The default mode is cache=writeback.
> 
> So users have no reason to assume that qemu-nbd is using writethough
> cache mode. The only hint is the painfully slow writing when using the
> defaults.

Oh, good catch.  Unfortunately too late for 6.1 proper, but I'll add
qemu-stable in cc and queue this through my NBD tree for 6.2.

> Users can avoid the issue by using --cache=writeback[1] but the defaults
> should give good performance for the common use case.
> 
> [1] https://bugzilla.redhat.com/1990656
> 
> Signed-off-by: Nir Soffer <nsoffer@redhat.com>
> ---

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2021-08-16 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 20:55 [PATCH] qemu-nbd: Change default cache mode to writeback Nir Soffer
2021-08-16 15:50 ` Eric Blake [this message]
2021-09-19 19:56   ` Nir Soffer
2021-09-20 16:52     ` Eric Blake

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=20210816155028.6rfmuxpdmc6yniit@redhat.com \
    --to=eblake@redhat.com \
    --cc=nirsof@gmail.com \
    --cc=nsoffer@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=vsementsov@virtuozzo.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).