[Spice-devel] Patch to support LZ4 compression algorithm
Javier Celaya
javier.celaya at flexvm.es
Wed Nov 5 06:11:01 PST 2014
Hello
El Miércoles, 5 de noviembre de 2014 08:58:25 Marc-André Lureau escribió:
> Hi
>
> ----- Original Message -----
>
> > Hello
> >
> > My name is Javier Celaya and I work for Flexible Solutions [1]. We develop
> > a virtualization product that includes a VDI module with Spice. As part
> > of this module, we have included support for the LZ4 compression
> > algorithm [2], and we
> > would like to contribute it to the main project.
>
> Great!
>
> > The LZ4 algorithm focuses on speed sacrificing compression ratio. In our
> > tests,
> > we obtained a compression ratio of x1.75~x2, while QUIC obtained ~x4.
> > However,
> > LZ4 was around 4~5 times faster than QUIC or GLZ. The objective was to
> > implement a Spice client for devices with limited CPU performance, like
> > smartphones or ARM set-top-boxes.
>
> Sounds reasonable
>
> > We have tried to keep things simple. Our approach consists in replacing
> > the
> > LZ
> > algorithm with LZ4 when Spice is built with the --enable-lz4 switch.
> > Adding
> > it
> > as a new option would also require changes in the software that uses the
> > server, like QEMU. Then, each image is compressed independently. Since the
> > LZ4
> > dictionary size is quite small (64KB), there is no improvement in
> > compressing all the images as a stream.
> >
> > I send you three patches, for spice-common, spice and spice-gtk. The
> > compression code is in spice, the decompression is in spice-common, and
> > spice-gtk only contains the macros needed to find liblz4 during configure.
>
> The patches look nice. However, I am not sure I understand why you chose not
> to modify the protocol to declare the new image type. We also need a new
> display capability before applying this patch, as the server needs to
> remain compatible with older clients no matter before accepting this.
>
> Would you be willing to do those changes to get your patch accepted?
Yes, I will do those changes and send the patches again.
Thanks
>
> thanks
More information about the Spice-devel
mailing list