[Git-commits] [grml/grml-live] 2ece29: initramfs xz-compress: use default xz compression ...

Michael Prokop noreply at github.com
Wed Apr 1 16:35:22 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-live
  Commit: 2ece298402ee047a9141e6bb7e4ea36ec671fa4b
      https://github.com/grml/grml-live/commit/2ece298402ee047a9141e6bb7e4ea36ec671fa4b
  Author: Michael Prokop <mika at grml.org>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M etc/grml/fai/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE

  Log Message:
  -----------
  initramfs xz-compress: use default xz compression level

Quoting from the bug report:

| How many threads are used also depends on the compression level. At -6,
| I've seen it use 3-4 threads, which speeds up initramfs compression a lot.
| With -8, it always only uses one thread (although maybe it also depends on
| the amount of data being compressed; I don't know).

The default compression preset level is -6, so there's no need to specify
it.

This also matches the behavior of initramfs-tools >=0.119:

| commit cf9691da3847a6bfadb4a5c9e0f6213bd7d10fdc
| Author: Ben Hutchings <ben at decadent.org.uk>
| Date:   Thu Oct 16 15:34:54 2014 +0200
|
|     mkinitramfs: Use default xz compression level rather than -8
|
|     xz -8 wants 370 MB VM for compression, but Debian tries to support
|     systems with less physical memory than that.
|
|     The benchmark results given in commit bedf1e3c0882 ('Use -8 for
|     compression with xz.') show only a 1% increase in size when changing
|     to -6, but VM usage will be reduced by 75%.
|
|     Closes: #697335
|     Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
|
| diff --git mkinitramfs mkinitramfs
| index 07190ed..25932c1 100755
| --- mkinitramfs
| +++ mkinitramfs
| @@ -146,7 +146,7 @@ if dpkg --compare-versions "${version}" lt "2.6.38" 2>/dev/null; then
|  fi
|
|  [ "${compress}" = lzop ] && compress="lzop -9"
| -[ "${compress}" = xz ] && compress="xz -8 --check=crc32"
| +[ "${compress}" = xz ] && compress="xz --check=crc32"
|
|  if [ -d "${outfile}" ]; then
|         echo "${outfile} is a directory" >&2

Let's keep the xz wrapper though, to force its usage independent of the
initramfs-tools version being used and have it available, if we decide to
add further custom options in the future.

Thanks: Dr. AndrĂ¡s Korn
Closes: https://github.com/grml/grml-live/issues/48




More information about the Git-commits mailing list