All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: Pavel Borzenkov <pborzenkov@virtuozzo.com>,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qcow2: avoid extra flushes in qcow2
Date: Thu, 2 Jun 2016 21:34:08 +0300	[thread overview]
Message-ID: <57507C20.4060305@openvz.org> (raw)
In-Reply-To: <1464883095-6285-1-git-send-email-den@openvz.org>

On 06/02/2016 06:58 PM, Denis V. Lunev wrote:
> The problem with excessive flushing was found by a couple of performance
> tests:
>    - parallel directory tree creation (from 2 processes)
>    - 32 cached writes + fsync at the end in a loop
>
> For the first one results improved from 2.6 loops/sec to 3.5 loops/sec.
> Each loop creates 10^3 directories with 10 files in each.
>
> For the second one results improved from ~600 fsync/sec to ~1100
> fsync/sec. Though, it was run on SSD so it probably won't show such
> performance gain on rotational media.
>
> qcow2_cache_flush() calls bdrv_flush() unconditionally after writing
> cache entries of a particular cache. This can lead to as many as
> 2 additional fdatasyncs inside bdrv_flush.
>
> We can simply skip all fdatasync calls inside qcow2_co_flush_to_os
> as bdrv_flush for sure will do the job. These flushes are necessary to
> keep the right order of writes to the different caches. Though this is
> not necessary in the current code base as this ordering is ensured through
> the flush in qcow2_cache_flush_dependency().
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Pavel Borzenkov <pborzenkov@virtuozzo.com>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
actually this is v2 version of the patchset, missed version number in 
the subject

  reply	other threads:[~2016-06-02 18:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 15:58 [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2 Denis V. Lunev
2016-06-02 18:34 ` Denis V. Lunev [this message]
2016-06-03  8:38 ` Kevin Wolf

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=57507C20.4060305@openvz.org \
    --to=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pborzenkov@virtuozzo.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.