All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	qemu block <qemu-block@nongnu.org>,
	den@openvz.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QCOW2 support for LZO compression
Date: Mon, 26 Jun 2017 12:08:01 +0200	[thread overview]
Message-ID: <b82ab934-ddc3-2d50-09cf-764f2165f2c8@kamp.de> (raw)
In-Reply-To: <20170626095719.GB4348@noname.redhat.com>

Am 26.06.2017 um 11:57 schrieb Kevin Wolf:
> Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben:
>>> So he chose a different algorithm (zstd). When I asked, he posted a
>>> comparison of algorithms (however a generic one and not measured in the
>>> context of qemu) that suggests that LZO would be slightly faster, but
>>> have a considerable worse compression ratio with the settings that were
>>> benchmarked.
>> My idea to choose LZO was that it is widely available and available in
>> any distro you can think of. We already have probing for it in configure.
>> My concern with ZSTD would be that it seems there are no packages
>> available for most distros and that it seems to be multi-threaded. I don't
>> know if this will cause any trouble?
> The availability and that we already link against LZO is a good point. I
> think we want to avoid a situation where compressed qcow2 files can't be
> read by binaries of popular distributions - after all, downloadable
> images are an important use case for compressed images.

As long as the default remains gzip I don't see any issues. If you choose
a different algorithm, you should know what you are doing.

>
>>> I think it's clear that if there is any serious interest in compression,
>>> we'll want to support at least one more algorithm. What we still need to
>>> evaluate is which one(s) to take, and whether a simple incompatible flag
>>> in the header like in Den's patch is enough or whether we should add a
>>> whole new header field for the compression algorithm (like we already
>>> have for encryption).
>>  From my side there clearly is interest in optimizing the compression. Its
>> even possible to speed up zlib by 3-4x times by choosing other parameters
>> for deflate which unfortunately are not compatible with our inflate settings.
>>
>> I don't know if its worth creating a new header field. Even if we spent to bits
>> in the end (one for LZO and one for ZSDT). I think this wouldn't hurt. However,
>> there are likely to pop up new compression algorithms in the future and
>> a header would be more flexible.
> That we could just use different parameters is an important hint that
> maybe we don't just need bits to select an algorithm, but also some
> space for parameters for the selected algorithm. In this case I think we
> need a header change anyway.

The issue is, you don't know in advance how much space will be needed for the paramters.
Maybe it would be simpler to have different settings for a compression algorithm threated
as different algorithms. Like zstd-fast, zstd, zstd-slow, gzip, lzo, lzo-slow etc.

>
>> I just don't want to make it too complicated and as you pointed out
>> compression is not that interesting for most people - maybe due to its
>> speed.
> In fact, I think it could be the poor integration in qemu. Compressed
> images might be more appealing if you couldn't only write compressed
> data with special-case operations like 'qemu-img convert', but just give
> an option that you want all writes to be compressed and then use it like
> any other image.

Then we should start to improve that.

Peter

  reply	other threads:[~2017-06-26 10:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0f83a15d-66b0-36aa-e5a4-d03cd37757c9@kamp.de>
2017-06-26  8:28 ` [Qemu-devel] QCOW2 support for LZO compression Kevin Wolf
2017-06-26  9:20   ` Peter Lieven
2017-06-26  9:33     ` Denis V. Lunev
2017-06-26  9:56       ` Peter Lieven
2017-06-26 10:16       ` Laszlo Ersek
2017-06-26 10:23         ` Denis V. Lunev
2017-06-26 10:41         ` Peter Lieven
2017-06-26  9:57     ` Kevin Wolf
2017-06-26 10:08       ` Peter Lieven [this message]
2017-06-26 10:12         ` Daniel P. Berrange
2017-06-26 10:20           ` Peter Lieven
2017-06-26 11:21         ` Kevin Wolf
2017-06-26 11:37           ` Peter Lieven
2017-06-26 10:04     ` Daniel P. Berrange
2017-06-26 10:15       ` Denis V. Lunev
2017-06-26 10:23         ` Peter Lieven
2017-06-26 11:12   ` Daniel P. Berrange
2017-06-26 11:44     ` Richard W.M. Jones
2017-06-26 20:30   ` Denis V. Lunev
2017-06-26 20:54     ` Peter Lieven
2017-06-26 20:56       ` Denis V. Lunev
2017-06-26 21:30     ` Laszlo Ersek

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=b82ab934-ddc3-2d50-09cf-764f2165f2c8@kamp.de \
    --to=pl@kamp.de \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mreitz@redhat.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.