qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [RESEND] RFC chaning zlib windowBits for QCOW2


From: Peter Lieven
Subject: Re: [Qemu-block] [RESEND] RFC chaning zlib windowBits for QCOW2
Date: Thu, 30 Jul 2015 12:12:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 27.07.2015 um 16:30 schrieb Stefan Hajnoczi:
On Mon, Jul 27, 2015 at 2:58 PM, Peter Lieven <address@hidden> wrote:
I was experimenting a little with optimized zlib versions (like zlib-ng) to
optimize the speed of compressed qcow2 generation.

I found out that chaning the windowBits from -12 to -15 alone increases
compression speed by about 15% while lowering
the compressed size by about 6%. As a test case I used a Debian 8.1 disk
image.

What is your opinion in chaning the windowBits? The cost is a higher memory
usage. The usage changes from 272k -> 384k for
compression and from 4k -> 32k for decompression.
Kevin is the qcow2 maintainer, but judging purely by the numbers you
posted it seems attractive to make this change.

Does it have any impact on the file format?  Right now -12 is
hard-coded in QEMU, so we need to make sure that existing files and
programs that can access qcow2 files continue to work with both
old/new images.  If compatibility is not possible then you'll have to
investigate feature bits.

The decompress code also takes a windowBits parameter and the docu says
that decoding a -15 image with a -12 setting should fail. It doesn't, but that
might depend on the zlib implementation.

The other way around works.

Peter




reply via email to

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