On Tue, Aug 12, 2014 at 2:52 PM, Richard W.M. Jones <rjo...@redhat.com> wrote:
> On Tue, Aug 12, 2014 at 07:46:30PM +0100, Daniel P. Berrange wrote: > > Taking the compression feature - arguably the biggest benefit of that > > is when you distribute disk images. eg if someone provides a root disk > > image on a web server, using compression in qcow2 can dramatically > > lower the download size, while still allowing QEMU to directly run > > from that qcow2 file. Sure you could wrap your disk images in gzip > > and then convert to your local filesystem at time of use but this > > introduces multiple extra steps. > > It would be nice if qemu could handle xz-compressed files > transparently, since (when prepared correctly) these files are > seekable. > > I have written code to do this here: > > https://github.com/libguestfs/nbdkit/tree/master/plugins/xz > > I believe it's ideal for read-only backing file, the xz-compressed image would be very space efficient for distribution :). Would you consider replace xz with lz4? it has faster decompression speed (~500MB/s)[1] and client-side decompression would be made painless. [1] http://linuxaria.com/article/linux-compressors-comparison-on-centos-6-5-x86-64-lzo-vs-lz4-vs-gzip-vs-bzip2-vs-lzma > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org > -- Cheers! 吴兴博 Wu, Xingbo <wux...@gmail.com>