linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Borowski <kilobyte@angband.pl>
To: Andi Kleen <ak@linux.intel.com>
Cc: "René Rebe" <rene@exactcode.com>,
	"Nick Terrell" <terrelln@fb.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"Kernel Team" <Kernel-team@fb.com>, "Chris Mason" <clm@fb.com>,
	"Julian Andres Klode" <julian.klode@canonical.com>
Subject: Re: [RESEND PATCH v2 0/2] Add support for ZSTD-compressed kernel
Date: Fri, 17 Aug 2018 22:07:47 +0200	[thread overview]
Message-ID: <20180817200747.bzmsl5nfwewyksvg@angband.pl> (raw)
In-Reply-To: <20180817192244.GF12066@tassilo.jf.intel.com>

On Fri, Aug 17, 2018 at 12:22:44PM -0700, Andi Kleen wrote:
> On Fri, Aug 17, 2018 at 07:57:46PM +0200, Adam Borowski wrote:
> > > The "favourite compressor" seems to roughly change every year, so if
> > > we keep adding new ones things will get more and more convoluted.
> > 
> > The above patchset drops just bzip2.  It is the only one that's strictly
> > beaten in every way (ratio, time, memory usage), there are also no other
> 
> Does time include build time? I've been reverting back to gzip recently
> because I care very much about that.

Too lazy to benchmark a kernel image (IIRC Nick Terrell posted that a while
ago), here's copypasta of a random 16824672 byte executable, in userspace,
with default level setting:

	comp	decomp	size
xz	8.038s	0.356s	4320292
bz2	2.265s	0.730s	5234516
zst	0.274s	0.102s	5657626
gz	0.880s	0.152s	6515505
Z	0.499s	0.133s	8932459
lzo	0.100s	0.095s	9198874

As you can see, zstd's compression time is drastically better than gzip,
while ratio is better.  The default level is very low (-3 on -1..-22 scale)
but you can crank it up for stronger compression.

The defaults fit your use case.

> > uses of bzip2 anywhere in the kernel so we'd get to drop its code
> > completely: 900 lines of Linus' happiness.
> 
> Great!
> 
> > Other candidates are lzo and bare lzma (you want lz4, zstd or xz instead),
> > but those are used elsewhere thus there's hardly any gain.  If you want them
> > gone, please say so -- I'll include their droppage.
> 
> Yes would be good to remove the kernel image support for those too
> just to simplify the config process, even if it doesn't save much code.

There's one caveat: fast choices are quite new:
* lz4 userspace tools are not even in current Debian stable (just unstable)
* uncompressed kernel got in only this merge window
* zstd has userspace tools in Debian stable but is not merged into the
  kernel yet
(other dists are probably similar)

Thus, it might be a good idea to keep lzo for a while longer.

Bare lzma can probably go -- xz filters are nice for binaries of archs it
knows (disabled otherwise), and lack of header requires hacks to find out
the payload's size.

So it's up to you guys: do you want me to drop lzo and/or lzma?
We can also drop them just for vmlinuz but not initrd.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition:
⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal [Mt3:16-17]
⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs [Mt14:17-20, Mt15:34-37]
⠈⠳⣄⠀⠀⠀⠀ • use glitches to walk on water [Mt14:25-26]

  reply	other threads:[~2018-08-17 20:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180322012943.4145794-1-terrelln@fb.com>
2018-03-22  2:58 ` [RESEND PATCH v2 0/2] Add support for ZSTD-compressed kernel Adam Borowski
     [not found] ` <C0384AAE-FF89-4BAA-8EFC-FB3B0A8F02AB@exactcode.com>
2018-03-22 12:35   ` Adam Borowski
2018-04-23 21:17     ` René Rebe
2018-07-09 18:04 ` Nick Terrell
2018-07-09 22:13   ` René Rebe
2018-08-17 16:15     ` René Rebe
2018-08-17 16:54       ` Andi Kleen
2018-08-17 17:15         ` René Rebe
2018-08-17 17:57         ` Adam Borowski
2018-08-17 19:22           ` Andi Kleen
2018-08-17 20:07             ` Adam Borowski [this message]
2018-08-28  2:36               ` Nick Terrell
     [not found]                 ` <0ABE55AB-D29B-4E12-8E12-A9AFD6E39382@exactcode.com>
2019-06-07 19:20                   ` Nick Terrell
2019-06-07 23:06                     ` Adam Borowski
2019-06-10 18:40                       ` Nick Terrell
2018-07-13 17:42   ` [PATCH] .gitignore: add ZSTD-compressed files Adam Borowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180817200747.bzmsl5nfwewyksvg@angband.pl \
    --to=kilobyte@angband.pl \
    --cc=Kernel-team@fb.com \
    --cc=ak@linux.intel.com \
    --cc=clm@fb.com \
    --cc=hpa@zytor.com \
    --cc=julian.klode@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rene@exactcode.com \
    --cc=terrelln@fb.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).