[Spice-devel] Meaning of compression settings in qemu

Marian Krcmarik mkrcmari at redhat.com
Fri Jun 17 02:13:42 PDT 2011



----- Original Message -----
> From: "John A. Sullivan III" <jsullivan at opensourcedevel.com>
> To: spice-devel at lists.freedesktop.org
> Sent: Friday, June 17, 2011 5:25:16 AM
> Subject: [Spice-devel] Meaning of compression settings in qemu
> Hello, all. I did take Marian's advice and peruse the qemu man page
> but, after lots and lots of Internet searching and document reading,
> I'm
> not quite clear on exactly what the compression settings mean in qemu.
> This is important to us as we need to optimize for an entirely WAN
> based
> environment.
> 
> I see we have:
> image-compression=[auto_glz|auto_lz|quic|glz|lz|off]
> I understand that glz uses a dictionary to reduce bandwidth
> consumption
> and is used for artificial images and quic is used for more
> photo-realistic images. I gather this is handled by SPICE
> automatically. Does that mean the difference between auto_glz and
> auto_lz is whether it chooses glz or lz (non-dictionary based) for the
> artifical bitmap compression? Does choosing quic, glz, or lz mean that
> is the only algorithm used and automatic selection based upon the type
> of image is disabled?

I do believe you got it right, please anyone, correct me If I am wrong.

> 
> Then we have:
> jpeg-wan-compression=[auto|never|always]
> zlib-glz-wan-compression=[auto|never|always]
> 
> I have noticed while watching stdout/stderr on the host that there
> does
> seem to be some way that the host senses the bandwidth of the client.
> So is jpeg-wan-compression to determine IF it compresses (and if so,
> what is the difference between that and the above image-compression
> parameter?) and zlib-glz-wan-compression to determine HOW it
> compresses
> if it is supposed to, i.e., with lossless GLZ alone or with lossy zlib
> on top of GLZ?
> 
> What is the overhead associated with simply leaving these on auto? ALL
> of our users are outside of the data center but the whole point of the
> organization is to be mobile. Thus, one day, the user may be accessing
> their Virtual Desktop on a PC at the end of a 100 Mbps WAN link and
> the
> next from their netbook tethered through their cellular phone. Thus,
> it
> would be great to dynamically adapt but, given the overhead of
> adapting
> and the low likelihood of someone being on a 100 Mbps WAN link, should
> we just set them all to always compress as if on a low bandwidth link?

As I believe the concept is:
Once client connects to a guest, "spice server" determines client's bandwidth (look at code for details, I believe It could be more appropriate and guys are working on it). "jpeg-wan-compression" and "zlib-glz-wan-compression" are enabled in case the client's bandwidth is <10Mbps, otherwise It's disabled. When jpeg compression and zlib over glz compression are enabled then photo-like bitmaps are compressed by lossy jpeg compression and textual/artificial bitmaps are compressed by lossy zlib on top of GLZ.
That's what I described is default behaviour (jpeg-wan-compression=auto, zlib-glz-wan-compression=auto).
Options always/never cause that jpeg/zlib over glz compressions are always/never enabled regardless of calculated bandwidth. 

> 
> Thanks - John
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list