Features/LZMA for Live Images

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
Line 23: Line 23:
 
* kernel
 
* kernel
 
** Lougher needs to do a new set of patches since the ones for 2.6.34 were only partially accepted.
 
** Lougher needs to do a new set of patches since the ones for 2.6.34 were only partially accepted.
*** We are still waiting for Lougher to have a chance to get an acceptable patch (to Linus) for the Linus kernel. If it gets into 2.6.37 or 2.6.38 we will have no trouble getting this into F15.
+
*** We are still waiting for Lougher to have a chance to get an acceptable patch (to Linus) for the Linus kernel. If it gets into 2.6.38 we will have no trouble getting this into F15.
 
*** Statements from Lougher:
 
*** Statements from Lougher:
 
**** https://bugzilla.redhat.com/show_bug.cgi?id=504425#c19
 
**** https://bugzilla.redhat.com/show_bug.cgi?id=504425#c19
Line 37: Line 37:
 
* livecd-creator
 
* livecd-creator
 
** Changes to livecd-creator:
 
** Changes to livecd-creator:
*** Change the default compression type to lzma.
+
*** Change the default compression type to xz.
 
*** Update the documentation to reflect the changed default.
 
*** Update the documentation to reflect the changed default.
 
*** These changes won't be made until after the kernel feature is available, so no fallback is needed.
 
*** These changes won't be made until after the kernel feature is available, so no fallback is needed.
 
* squashfs-tools
 
* squashfs-tools
** squashfs-tools is back on the table as it looks like xz will be separate from lzma.
+
** squashfs-tools is back on the table as XZ (LZMA2) will be separate from LZMA.
 
** The development version needs to get built and tested.
 
** The development version needs to get built and tested.
*** A 4.2 prerelease scratch build has been made.
+
*** A 4.2 prerelease build is now in rawhide.
**** A rawhide build needs to be done after some sanity testing has been done locally.
+
 
** The squashfs-tools 4.2 release is tentatively planned for mid-February.
 
** The squashfs-tools 4.2 release is tentatively planned for mid-February.
** Some minimal squashfs-tools test cases should be made as part of this so it can get critical path testing easier.
+
** A [https://fedoraproject.org/wiki/QA:Testcase_squashfs-tools_compression test case] has been created to make it easier to get critical path testing.
  
 
== How To Test ==
 
== How To Test ==

Revision as of 03:27, 27 December 2010

Contents

LZMA for Live Images

Summary

Enabling LZMA for compression to allow us ship more software on our live images.

Owner

  • Email: <bruno@wolff.to>

Current status

  • Targeted release: Fedora 15
  • Last updated: 2010-12-24
  • Percentage of completion: 10%

Detailed Description

LZMA compression typically provides better compression than gzip while still providing relatively fast uncompression. Once squashfs file systems are supported by the kernel we can use them for building live images. A test with the games spin resulted in a 8.7% reduction (from 4242538496 bytes to 3873439744 bytes) in size of the resulting live image.

Benefit to Fedora

By allowing more packages to be put on a Live Image, we can make a few of our space constrained images better. For other images, having them be smaller will make them faster to download.

Scope

  • kernel
  • livecd-creator
    • Changes to livecd-creator:
      • Change the default compression type to xz.
      • Update the documentation to reflect the changed default.
      • These changes won't be made until after the kernel feature is available, so no fallback is needed.
  • squashfs-tools
    • squashfs-tools is back on the table as XZ (LZMA2) will be separate from LZMA.
    • The development version needs to get built and tested.
      • A 4.2 prerelease build is now in rawhide.
    • The squashfs-tools 4.2 release is tentatively planned for mid-February.
    • A test case has been created to make it easier to get critical path testing.

How To Test

  • We need to make sure live images work.
  • We need to make sure live images are smaller using LZMA2 (xz) compression.
  • We need to make sure performance is acceptable.
    • Using a live image needs to not be noticeably slower (hopefully it will be faster with typcial hardware) with LZMA than with gzip compression.
    • Making a compressed file system using LZMA can be somewhat slower than with gzip, because commonly time isn't as critical when making the image (compared to using it).
    • We need to test unsquashing squashed images work using unsquashfs (both LZMA and gzip).
  • Specific test cases: (Note in early testing, the default will be gzip rather than lzma.)
    • Squashfs 4.1
      • No --compression-type
        • Should build using xz and image should work.
      • --compression-type=gzip
        • Should build using gzip and image should work.
      • --compression-type=xz
        • Should build using lzma and image should work with a kernel that supports lzma squashfs.
        • The image should be smaller than with gzip compression.
        • The image should run nearly as fast or faster than with gzip compression on common hardware.
        • The time needed to build the image should not be inordinately longer than with gzip on common hardware.
      • --compression-type=garbage
        • A reasonable error message should be displayed
      • Test using a 2.6.33 kernel (with gzip) to make sure the xattr feature doesn't cause a problem for kernels that don't support that in squashfs file systems.
      • Test livecd-iso-to-disk on an image using lzma with a system with a 4.0 version of squashfs-tools.
      • Test livecd-iso-to-disk on an image using gzip with a system with a 4.0 version of squashfs-tools.
    • Squashfs 4.0
      • No --compression-type
        • A reasonable error message should be displayed
      • --compression-type=gzip
        • Should build using gzip and image should work.
      • --compression-type=xz
        • A reasonable error message should be displayed
      • --compression-type=garbage
        • A reasonable error message should be displayed
    • man livecd-creator
      • Should have the --compression-type option documented with the correct default. (gzip in eary testing, xz in later testing.)
    • livecd-creator --help
      • Should have the --compression-type option documented with the correct default. (gzip in eary testing, xz in later testing.)

User Experience

Live images will be smaller or have more included packages.

Dependencies

  • kernel (may need to ask for backport)
  • livecd-tools

Contingency Plan

  • Since there isn't really anything further to do until the kernel feature is available, the fallback is pretty much not to do anything.

Documentation

  • Most likely livecd-creator would be getting a new option and would need its help updated along with the code changes.

Release Notes

  • Mention the squashfs version change, that it supports LZMA compression, point to its documentation and note that it is supported in the kernel as well.
  • Mention that livecd-creator uses LZMA by default, how to get gzip compression if desired for use with older kernels or other reasons.

Thanks

I would like to thank Phillip Lougher for his work on squashfs. The key work needed for this feature was done by Phillip upstream.

Comments and Discussion