Announcement

Collapse
No announcement yet.

Support For Compressing The Linux Kernel With LZ4

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support For Compressing The Linux Kernel With LZ4

    Phoronix: Support For Compressing The Linux Kernel With LZ4

    A set of patches that allow the Linux kernel image to be compressed with the LZ4 lossless compression algorithm have been published. The size of LZ4-compressed Linux kernel images are larger than using LZO compression, but there's promise that the boot times could be better...

    http://www.phoronix.com/vr.php?view=MTI4NjM

  • #2
    Originally posted by BO$$ View Post
    What is the point of having a compressed kernel? Faster loading times from the HDD?
    Smaller footprint which means: yes faster loading times from hdd, smaller filesize ON the hdd (embedded) and means it can be shoved into RAM if you wanted the entire live system into ram for responsiveness

    Comment


    • #3
      what happened to btrfs's lz4 compression support?

      it seems lz4 makes sense a lot for always compressing files when not using a sandforce ssd.

      Comment


      • #4
        I wonder what would happen if a lossy algorythem was used

        Comment


        • #5
          Originally posted by AJenbo View Post
          I wonder what would happen if a lossy algorythem was used
          then you have a lossy system.

          Comment


          • #6
            Originally posted by AJenbo View Post
            I wonder what would happen if a lossy algorythem was used
            Then i'd hope that the decompression algorithm was very good about reconstructing the lost data which would probably mean a longer decompression time =P

            Comment


            • #7
              come on... 100ms difference, you cannot even measure that with your watch. But you can measure the init-time after the kernel is loaded...

              Comment


              • #8
                Originally posted by Ericg View Post
                Smaller footprint which means: yes faster loading times from hdd, smaller filesize ON the hdd (embedded) and means it can be shoved into RAM if you wanted the entire live system into ram for responsiveness
                I don't think you can have a running kernel, compressed in ram. As far as I know, it gets loaded from some form of storage (flash, hdd, nfs) and decompressed into ram.

                come on... 100ms difference, you cannot even measure that with your watch. But you can measure the init-time after the kernel is loaded...
                This was on their test-system I'm sure. I bet on an ARM-m3 it takes quite a lot longer. So we're talking about 100% faster decompression times (150ms vs 300ms).

                Comment


                • #9
                  I guess Google is also very interested on this getting into mainline kernel.

                  Comment


                  • #10
                    Originally posted by mercutio View Post
                    what happened to btrfs's lz4 compression support?

                    it seems lz4 makes sense a lot for always compressing files when not using a sandforce ssd.
                    Perhaps you are thinking of ZFS. ZFSOnLinux HEAD has LZ4 support. I believe that btrfs had planned to adopt snappy. The two compression algorithms are roughly equivalent in benchmarks.

                    Comment


                    • #11
                      Originally posted by ryao View Post
                      Perhaps you are thinking of ZFS. ZFSOnLinux HEAD has LZ4 support. I believe that btrfs had planned to adopt snappy. The two compression algorithms are roughly equivalent in benchmarks.
                      http://www.phoronix.com/scan.php?pag...tem&px=MTA1OTQ

                      looks like lz4 is about 25 to 30% faster than snappy.
                      Last edited by mercutio; 02-01-2013, 05:50 PM.

                      Comment


                      • #12
                        Originally posted by mercutio View Post
                        http://www.phoronix.com/scan.php?pag...tem&px=MTA1OTQ

                        looks like lz4 is about 25 to 30% faster than snappy.
                        I had recalled reading the following when saying that the two were roughly equivalent:

                        http://extrememoderate.wordpress.com...ession-part-1/

                        The LZ4 website has benchmarks that are probably more accurate:

                        http://code.google.com/p/lz4/

                        According to them, LZ4 is faster than Snappy. The compression rate is 45% higher while the decompression rate is 26% higher. The compression ratio of LZ4 is also slightly higher than that of snappy.

                        With that said, it appears that btrfs support for both Snappy and LZ4 has not been merged:

                        https://btrfs.wiki.kernel.org/index....merged_Patches

                        Gentoo Linux's ZFS kernel modules gained support for LZ4 two days ago. Gentoo's GRUB package was updated with support for booting off LZ4 compressed ZFS /boot datasets yesterday. People interested in filesystems that support LZ4 compression could always try ZFS.

                        Comment


                        • #13
                          Originally posted by ryao View Post
                          I had recalled reading the following when saying that the two were roughly equivalent:

                          http://extrememoderate.wordpress.com...ession-part-1/

                          The LZ4 website has benchmarks that are probably more accurate:

                          http://code.google.com/p/lz4/

                          According to them, LZ4 is faster than Snappy. The compression rate is 45% higher while the decompression rate is 26% higher. The compression ratio of LZ4 is also slightly higher than that of snappy.
                          I wonder how it compares on cellphones. (slow cpu with little cache)

                          With that said, it appears that btrfs support for both Snappy and LZ4 has not been merged:

                          https://btrfs.wiki.kernel.org/index....merged_Patches
                          Damnit

                          Gentoo Linux's ZFS kernel modules gained support for LZ4 two days ago. Gentoo's GRUB package was updated with support for booting off LZ4 compressed ZFS /boot datasets yesterday. People interested in filesystems that support LZ4 compression could always try ZFS.
                          Been using ZFS with LZJB compression on OpenIndiana. Looking forward to LZ4...
                          Last edited by mercutio; 02-04-2013, 07:56 PM.

                          Comment


                          • #14
                            Anyon know of a bench against latest LZO 2.06 or better ? And if Pcompress http://moinakg.wordpress.com/tag/pcompress/ performance tweaks are applied to this vesion of LZ4?

                            Comment


                            • #15
                              Some recent tests in the LKML list: https://lkml.org/lkml/2013/2/26/361

                              armv7 (Cortex-A9), Linaro gcc-4.6 -O3, Silesia test corpus, 256 kB block-size:

                              compression speed decompression speed

                              LZO-2012 : 44 MB/sec 117 MB/sec no unaligned access
                              LZO-2013-UA : 47 MB/sec 167 MB/sec Unaligned Access
                              LZ4 r88 UA : 46 MB/sec 154 MB/sec Unaligned Access

                              ~Markus

                              Comment

                              Working...
                              X