[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 1/1] qcow2: avoid extra flushes in qcow2

From: Denis V. Lunev
Subject: Re: [Qemu-block] [PATCH v2 1/1] qcow2: avoid extra flushes in qcow2
Date: Thu, 2 Jun 2016 21:34:08 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 06/02/2016 06:58 PM, Denis V. Lunev wrote:
The problem with excessive flushing was found by a couple of performance
   - 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 <address@hidden>
CC: Pavel Borzenkov <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
actually this is v2 version of the patchset, missed version number in the subject

reply via email to

[Prev in Thread] Current Thread [Next in Thread]