Public bug reported:

Turns out that loading is always the slow part in loading initramfs into
memory and decompressing it since decompression is always the final
10-20% or so of the task.  It therefore makes sense to use a good
compressor that shrinks the initramfs as much as possible with little
decompression overhead.

Benchmarking zstd vs lz4 shows that while zstd can be ~5x slower in
decompression, the image size is much smaller with zstd than lz4, and
since ~80-90% of the boot time is loading the image it makes sense to
use zstd.

Attached is a libreoffice spread sheet showing typical load and
decompression times for a fairly standard 3.4 GHZ intel box with data
for load times for a 5400 RPM, 7200 RPM and SATA SSD drives.

The conclusions from the test results (attached) show:

1. Loading time is always significantly slower than decompression time.
2. ZSTD is 5x slower than LZ4 in decompression speed but produces far
better compressed images
3. Given that loading time is the major factor in loading +
decompression, ZSTD is best for kernel and initramfs boot timings.

(Also refer to https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3
/kernel-compression-method.txt for some raw data on drive load speeds
for the same UEFI box I did a couple of years ago).

** Affects: initramfs-tools (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Seth Forshee (sforshee)
         Status: New

** Attachment added: "Libreoffice spread sheet with supporting data"
   
https://bugs.launchpad.net/bugs/1931725/+attachment/5504114/+files/zstd-vs-lz4-initramfs-kernel-benchmarks.ods

** Description changed:

  Turns out that loading is always the slow part in loading initramfs into
- memory, decompression is always the final 10-20% or so of the task.  It
- therefore makes sense to use the a good compressor that shrinks the
- initramfs as much as possible with little decompression overhead.
+ memory and decompressing it since decompression is always the final
+ 10-20% or so of the task.  It therefore makes sense to use a good
+ compressor that shrinks the initramfs as much as possible with little
+ decompression overhead.
  
  Benchmarking zstd vs lz4 shows that while zstd can be ~5x slower in
  decompression the image size is much smaller with zstd than lz4, and
  since ~80-90% of the boot time is loading the image it makes sense to
  use zstd.
  
  Attached is a libreoffice spread sheet showing typical load and
  decompression times for a fairly standard 3.4 GHZ intel box with data
  for load times for a 5400 RPM, 7200 RPM and SATA SSD drives.
  
  The conclusions from the test results (attached) show:
  
  1. Loading time is always significantly slower than decompression time.
  2. ZSTD is 5x slower than LZ4 in decompression speed but produces far
  better compressed images
  3. Given that loading time is the major factor in loading +
  decompression, ZSTD is best for kernel and initramfs boot timings.
  
  (Also refer to https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3
  /kernel-compression-method.txt for some raw data on drive load speeds
  for the same UEFI box I did a couple of years ago).

** Description changed:

  Turns out that loading is always the slow part in loading initramfs into
  memory and decompressing it since decompression is always the final
  10-20% or so of the task.  It therefore makes sense to use a good
  compressor that shrinks the initramfs as much as possible with little
  decompression overhead.
  
  Benchmarking zstd vs lz4 shows that while zstd can be ~5x slower in
- decompression the image size is much smaller with zstd than lz4, and
+ decompression, the image size is much smaller with zstd than lz4, and
  since ~80-90% of the boot time is loading the image it makes sense to
  use zstd.
  
  Attached is a libreoffice spread sheet showing typical load and
  decompression times for a fairly standard 3.4 GHZ intel box with data
  for load times for a 5400 RPM, 7200 RPM and SATA SSD drives.
  
  The conclusions from the test results (attached) show:
  
  1. Loading time is always significantly slower than decompression time.
  2. ZSTD is 5x slower than LZ4 in decompression speed but produces far
  better compressed images
  3. Given that loading time is the major factor in loading +
  decompression, ZSTD is best for kernel and initramfs boot timings.
  
  (Also refer to https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3
  /kernel-compression-method.txt for some raw data on drive load speeds
  for the same UEFI box I did a couple of years ago).

** Also affects: linux (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu)
     Assignee: (unassigned) => Seth Forshee (sforshee)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1931725

Title:
  initramfs-tools: use zstd as the default compression method

Status in initramfs-tools package in Ubuntu:
  New
Status in linux package in Ubuntu:
  New

Bug description:
  Turns out that loading is always the slow part in loading initramfs
  into memory and decompressing it since decompression is always the
  final 10-20% or so of the task.  It therefore makes sense to use a
  good compressor that shrinks the initramfs as much as possible with
  little decompression overhead.

  Benchmarking zstd vs lz4 shows that while zstd can be ~5x slower in
  decompression, the image size is much smaller with zstd than lz4, and
  since ~80-90% of the boot time is loading the image it makes sense to
  use zstd.

  Attached is a libreoffice spread sheet showing typical load and
  decompression times for a fairly standard 3.4 GHZ intel box with data
  for load times for a 5400 RPM, 7200 RPM and SATA SSD drives.

  The conclusions from the test results (attached) show:

  1. Loading time is always significantly slower than decompression time.
  2. ZSTD is 5x slower than LZ4 in decompression speed but produces far
  better compressed images
  3. Given that loading time is the major factor in loading +
  decompression, ZSTD is best for kernel and initramfs boot timings.

  (Also refer to https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3
  /kernel-compression-method.txt for some raw data on drive load speeds
  for the same UEFI box I did a couple of years ago).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1931725/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to