qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] block/qcow2: add zlib-fast compression algo


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH 4/4] block/qcow2: add zlib-fast compression algorithm
Date: Tue, 27 Jun 2017 15:23:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Am 27.06.2017 um 15:16 schrieb Daniel P. Berrange:
On Tue, Jun 27, 2017 at 02:34:10PM +0200, Peter Lieven wrote:
this adds support for optimized zlib settings which almost
tripples the compression speed while maintaining about
the same compressed size.

Signed-off-by: Peter Lieven <address@hidden>
---
  block/qcow2-cluster.c |  3 ++-
  block/qcow2.c         | 11 +++++++++--
  block/qcow2.h         |  1 +
  qemu-img.texi         |  1 +
  4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/qemu-img.texi b/qemu-img.texi
index 043c1ba..83a5db2 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -627,6 +627,7 @@ The following options are available if support for the 
respective libraries
  has been enabled at compile time:
zlib Uses standard zlib compression (default)
+   zlib-fast       Uses zlib compression with optimized compression parameters
This looks like a poor design from a future proofing POV. I would much
rather see us introduce a more flexible modelling of compression at the
QAPI layer which lets us have tunables for each algorith, in the same
way that the qcow2 built-in encryption now has ability to set tunables
for each algorithm.

eg your "zlib-fast" impl which just uses zlib with a window size of -15
could be expressed as

    qemu-img create -o compress.format=zlib,compress.window=-15

It would also need a compress.level, but okay. This will make things
more complicated as one might not know what good values for
the algoritm are.

Wouldn't it be better to have sth like compress.level=1..9 and let
the implementation decide which parameters it choose for the algorithm?

Do you have a pointer where I can find out how to imlement that
in QAPI? Maybe the patches that introduces the encryption settings?

Thanks,
Peter




reply via email to

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