All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/15] preallocate filter
@ 2020-09-18 18:19 Vladimir Sementsov-Ogievskiy
  2020-09-18 18:19 ` [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING Vladimir Sementsov-Ogievskiy
                   ` (14 more replies)
  0 siblings, 15 replies; 37+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2020-09-18 18:19 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, vsementsov, armbru, eblake, fam, stefanha, mreitz,
	kwolf, den

Hi all!

Here is a filter, which does preallocation on write.

In Virtuozzo we have to deal with some custom distributed storage
solution, where allocation is very-very expensive operation. We have to
workaround it in Qemu, so here is a new filter.

Still, the filter shows good results for me even for xfs and ext4.

Here are results, produced by new benchmark (last 4 patches):

All results are in iops (larger means better)

----------------------------------  -----------  -----------
                                    A            B
                                    no-prealloc  prealloc
ssd-ext4, aligned sequential 16k    19934±1.2%   27108±0.27%
                                                  A+36±2%
ssd-xfs, aligned sequential 16k     15528±5.5%   25953±3.3%
                                                  A+67±11%
hdd-ext4, aligned sequential 16k    5079±29%     3165±11%
                                                  A-38±36%
hdd-xfs, aligned sequential 16k     4096±95%     3321±7.6%
                                                  A-19±101%
ssd-ext4, unaligned sequential 64k  19969±1.9%   27043±0.49%
                                                  A+35±3%
ssd-xfs, unaligned sequential 64k   15403±2.8%   25725±6.4%
                                                  A+67±13%
hdd-ext4, unaligned sequential 64k  5250±17%     3239±8.7%
                                                  A-38±23%
hdd-xfs, unaligned sequential 64k   5291±8.2%    3336±4.2%
                                                  A-37±11%
----------------------------------  -----------  -----------

Note: it's on Fedora 30, kernel 5.6.13-100.fc30.x86_64

The tests are actually qemu-img bench, run like:

  ./qemu-img create -f qcow2 $img 16G

aligned:
  ./qemu-img bench -c 10000 -d 64 -f qcow2  -s 16k -t none -n -w $img

unaligned
  ./qemu-img bench -c 10000 -d 64 -f qcow2 -o 1k -s 64k -t none -n -w $img

and for preallocation, you'll drop -f qcow2, add --image-opts, and
instead of just $img use
  driver=qcow2,file.driver=preallocate,file.file.driver=file,file.file.filename=$img 

v6:
05: add Max's r-b
06: add Max's r-b
07: new
08: Changed a lot. really. no .active now, support more use-cases.
    Somehow, now I see performance benefit on xfs too :)
    probably due to .zero_start feature.
09: new
10: new
11: mostly rewritten, a lot more cases, drop r-b
12-15: new, to produce final benchmark table

Vladimir Sementsov-Ogievskiy (15):
  block: simplify comment to BDRV_REQ_SERIALISING
  block/io.c: drop assertion on double waiting for request serialisation
  block/io: split out bdrv_find_conflicting_request
  block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg
  block: bdrv_mark_request_serialising: split non-waiting function
  block: introduce BDRV_REQ_NO_WAIT flag
  block: bdrv_check_perm(): process children anyway
  block: introduce preallocate filter
  qemu-io: add preallocate mode parameter for truncate command
  iotests: qemu_io_silent: support --image-opts
  iotests: add 298 to test new preallocate filter driver
  scripts/simplebench: support iops
  scripts/simplebench: improve view of ascii table
  scripts/simplebench: improve ascii table: add difference line
  scripts/simplebench: add bench_prealloc.py

 docs/system/qemu-block-drivers.rst.inc |  26 ++
 qapi/block-core.json                   |  20 +-
 include/block/block.h                  |  20 +-
 include/block/block_int.h              |   3 +-
 block.c                                |  10 +-
 block/file-posix.c                     |   2 +-
 block/io.c                             | 130 +++---
 block/preallocate.c                    | 556 +++++++++++++++++++++++++
 qemu-io-cmds.c                         |  46 +-
 block/meson.build                      |   1 +
 scripts/simplebench/bench_prealloc.py  | 128 ++++++
 scripts/simplebench/simplebench.py     | 103 ++++-
 tests/qemu-iotests/298                 | 186 +++++++++
 tests/qemu-iotests/298.out             |   5 +
 tests/qemu-iotests/group               |   1 +
 tests/qemu-iotests/iotests.py          |   7 +-
 16 files changed, 1146 insertions(+), 98 deletions(-)
 create mode 100644 block/preallocate.c
 create mode 100755 scripts/simplebench/bench_prealloc.py
 create mode 100644 tests/qemu-iotests/298
 create mode 100644 tests/qemu-iotests/298.out

-- 
2.21.3



^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2020-10-01  8:42 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 18:19 [PATCH v6 00/15] preallocate filter Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 01/15] block: simplify comment to BDRV_REQ_SERIALISING Vladimir Sementsov-Ogievskiy
2020-09-28 15:34   ` Alberto Garcia
2020-09-18 18:19 ` [PATCH v6 02/15] block/io.c: drop assertion on double waiting for request serialisation Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 03/15] block/io: split out bdrv_find_conflicting_request Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 04/15] block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 05/15] block: bdrv_mark_request_serialising: split non-waiting function Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 06/15] block: introduce BDRV_REQ_NO_WAIT flag Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 07/15] block: bdrv_check_perm(): process children anyway Vladimir Sementsov-Ogievskiy
2020-09-24 14:25   ` Max Reitz
2020-09-24 14:55     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 08/15] block: introduce preallocate filter Vladimir Sementsov-Ogievskiy
2020-09-24 16:50   ` Max Reitz
2020-09-24 17:36     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 09/15] qemu-io: add preallocate mode parameter for truncate command Vladimir Sementsov-Ogievskiy
2020-09-24 17:08   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 10/15] iotests: qemu_io_silent: support --image-opts Vladimir Sementsov-Ogievskiy
2020-09-25  7:10   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 11/15] iotests: add 298 to test new preallocate filter driver Vladimir Sementsov-Ogievskiy
2020-09-25  8:26   ` Max Reitz
2020-09-25  8:49     ` Vladimir Sementsov-Ogievskiy
2020-09-25  9:11       ` Max Reitz
2020-09-25 15:11         ` Vladimir Sementsov-Ogievskiy
2020-09-25 15:32           ` Vladimir Sementsov-Ogievskiy
2020-10-01  7:40             ` Max Reitz
2020-10-01  8:41           ` Thomas Huth
2020-09-18 18:19 ` [PATCH v6 12/15] scripts/simplebench: support iops Vladimir Sementsov-Ogievskiy
2020-09-25  8:54   ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 13/15] scripts/simplebench: improve view of ascii table Vladimir Sementsov-Ogievskiy
2020-09-25  9:31   ` Max Reitz
2020-09-25 16:58     ` Vladimir Sementsov-Ogievskiy
2020-09-18 18:19 ` [PATCH v6 14/15] scripts/simplebench: improve ascii table: add difference line Vladimir Sementsov-Ogievskiy
2020-09-25 10:24   ` Max Reitz
2020-09-25 17:13     ` Vladimir Sementsov-Ogievskiy
2020-10-01  8:22       ` Max Reitz
2020-09-18 18:19 ` [PATCH v6 15/15] scripts/simplebench: add bench_prealloc.py Vladimir Sementsov-Ogievskiy
2020-09-25 11:25   ` Max Reitz

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.