Announcement

Collapse
No announcement yet.

Ubuntu Moving Ahead With Compressing Their Kernel Image Using LZ4

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

  • #21
    Originally posted by Danny3 View Post
    Now I'm wondering what the kernel time from systemd-analyze mean in the command output on my laptop:
    Startup finished in 3.371s (kernel) + 11.628s (userspace) = 14.999s
    Is the time counted from when the kernel decompressor starts or is the time counted after the kernel is decompressed?
    Is systemd-analyze tool able to show a difference between these compression / decompression algorithms?
    Decompression is happening before any logs are available, most you could get is some messages on a early serial driver (needs to be configured during compilation). You would have to measure yourself.
    The decoder is really a layer around the kernel-image, kinda like some self-extracting zip/rar archive. On one of my ARM boards this is painfully obvious, as the bootloader is not able to initialize the voltage regulators and the cpu runs at s laughable fraction of its speed while decompressing.

    You could however see the time it takes to decompress the initramdisk in the logs.

    Comment


    • #22
      Originally posted by Raka555 View Post
      According to this page : https://github.com/facebook/zstd
      Decompress speed:
      lz4: 4220 MB/s
      gzip-1: 440 MB/s
      zstd-1: 1360 MB/s
      Cannot reproduce those supposed decompression speeds. (Then again, using a binary executable corpus, and not the Silesia text corups!)
      zstd 1.4.0 is giving about 3300-3600 MB/s across all its 19 levels, and lz4 1.9.1 2400-3000 MB/s across all 12 levels. (gzip 1600-1700). (CPU: ryzen 1700, all 16 threads busy with decomp.)
      Last edited by uxmkt; 06-07-2019, 05:49 AM.

      Comment


      • #23
        Originally posted by LoveRPi View Post
        In modern era of SSD and eMMC based drives, lz4 is optimally suited. It's the only compression and decompression method that can saturate these devices.
        bzip2 would be better if the kernel implemented multi threaded decompression. much better compression ratio, and with a decent number of cores, it's faster than lz4.

        Comment


        • #24
          Originally posted by Raka555 View Post
          So now it is 138.02 ms faster at boot time. Still not even close to a second ...
          One of my previous employees have switched to LZ4 years ago for embedded ARM devices after benchmarking various compression options and realized that the space-time trade-off is good enough

          Comment


          • #25
            Originally posted by phuclv View Post

            One of my previous employees have switched to LZ4 years ago for embedded ARM devices after benchmarking various compression options and realized that the space-time trade-off is good enough
            Time for him/her to re-do that investigation with zstd in the mix

            Comment

            Working...
            X