All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Plotnikov <dplotnikov@virtuozzo.com>
To: kwolf@redhat.com, mreitz@redhat.com, eblake@redhat.com,
	armbru@redhat.com
Cc: vsementsov@virtuozzo.com, den@virtuozzo.com,
	qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 0/3] add zstd cluster compression
Date: Thu,  4 Jul 2019 16:09:46 +0300	[thread overview]
Message-ID: <20190704130949.14017-1-dplotnikov@virtuozzo.com> (raw)

change log:

v2:
    * relax the compression type setting restriction in the spec
    * fix qcow2 header size checking
    * fix error processing and messaging
    * fix qcow2 image specific info reporting
    * set Qcow2CompressionType zstd config dependant
    * add zstd compressed cluster format description to the spec

v1:
    * extend qcow2 header instead of adding a new incompatible extension header
      specification re-written accordingly
    * enable zstd compression via config
    * fix zstd (de)compression functions
    * fix comments/description
    * fix function naming

---
The goal of the patch-set is to enable qcow2 to use zstd compression for
clusters. ZSTD provides better (de)compression performance than currently
used ZLIB. Using it will improve perforamnce (reduce compression time)
when the compressed clusters is used, e.g backup scenarios.

Also, the patch-set extends qcow2 specification by adding compression_type
feature. The feature enables adding ZSTD and another compression algorithms
in the future.

Here is some measurements ZSTD vs ZLIB:

The test:
    Test compresses and decompresses qemu qcow2 image with just
    installed rhel-7.6 guest.
    Image cluster size: 64K. Image on disk size: 2.2G
    
    The test was conducted with brd disk to reduce the influence
    of disk subsystem to the test results.
    The results is given in seconds.
    
    compress cmd:
      time ./qemu-img convert -O qcow2 -c -o compression_type=[zlib|zstd]
                      src.img [zlib|zstd]_compressed.img
    decompress cmd
      time ./qemu-img convert -O qcow2
                      [zlib|zstd]_compressed.img uncompressed.img


The results:    
               compression               decompression
             zlib       zstd           zlib         zstd
    ------------------------------------------------------------
    real     65.5       16.3 (-75 %)    1.9          1.6 (-16 %)
    user     65.0       15.8            5.3          2.5
    sys       3.3        0.2            2.0          2.0
    
    Both ZLIB and ZSTD gave the same compression ratio: ~1.5
    compressed image size in both cases: ~1.4G

Denis Plotnikov (3):
  qcow2: introduce compression type feature
  qcow2: rework the cluster compression routine
  qcow2: add zstd cluster compression

 block/qcow2.c             | 287 +++++++++++++++++++++++++++++++++++---
 block/qcow2.h             |  26 +++-
 configure                 |  32 +++++
 docs/interop/qcow2.txt    |  40 +++++-
 include/block/block_int.h |   1 +
 qapi/block-core.json      |  23 ++-
 6 files changed, 379 insertions(+), 30 deletions(-)

-- 
2.17.0



             reply	other threads:[~2019-07-04 13:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 13:09 Denis Plotnikov [this message]
2019-07-04 13:09 ` [Qemu-devel] [PATCH v2 1/3] qcow2: introduce compression type feature Denis Plotnikov
2019-07-09  6:15   ` Markus Armbruster
2019-08-07 23:12   ` Max Reitz
2019-08-08  0:09     ` Eric Blake
2019-08-08 12:48       ` Max Reitz
2019-08-08  0:18   ` Eric Blake
2019-08-08 12:50     ` Max Reitz
2019-08-08 14:07       ` Kevin Wolf
2019-07-04 13:09 ` [Qemu-devel] [PATCH v2 2/3] qcow2: rework the cluster compression routine Denis Plotnikov
2019-08-08 13:30   ` Max Reitz
2019-08-08 14:39   ` Max Reitz
2019-07-04 13:09 ` [Qemu-devel] [PATCH v2 3/3] qcow2: add zstd cluster compression Denis Plotnikov
2019-07-09  6:18   ` Markus Armbruster
2019-07-30 14:42     ` Denis Plotnikov
2019-08-08  0:24   ` Eric Blake
2019-08-08 14:44   ` Max Reitz
2019-07-30 14:45 ` [Qemu-devel] [PATCH v2 0/3] " Denis Plotnikov
2019-08-07  7:12   ` Denis Plotnikov

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=20190704130949.14017-1-dplotnikov@virtuozzo.com \
    --to=dplotnikov@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@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 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.