mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Borowski <kilobyte@angband.pl>
To: Nick Terrell <terrelln@fb.com>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.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>,
	Yann Collet <cyan@fb.com>, Rene Rebe <rene@exactcode.com>
Subject: Re: [PATCH 0/2] Add support for ZSTD-compressed kernel
Date: Wed, 11 Oct 2017 02:08:05 +0200	[thread overview]
Message-ID: <20171011000805.7b2nteb5hjbrfe7a@angband.pl> (raw)
In-Reply-To: <6BB37085-0223-4A61-81BF-18C450C210FD@fb.com>

On Tue, Oct 10, 2017 at 10:40:13PM +0000, Nick Terrell wrote:
> On 10/10/17, 2:56 PM, "hpa@zytor.com" <hpa@zytor.com> wrote:
> >On October 10, 2017 2:22:42 PM PDT, Nick Terrell <terrelln@fb.com> wrote:
> >>This patch set adds support for a ZSTD-compressed kernel and ramdisk
> >>images in the kernel boot process. It only integrates the support with
> >>x86, though the first patch is generic to all architectures.
> >>
> >>Zstandard requires slightly more memory during the kernel decompression
> >>on x86 (192 KB vs 64 KB), and the memory usage is independent of the
> >>window size.
> >>
> >>Zstandard requires memory proprortional to the window size used during
> >>compression for decompressing the ramdisk image, since streaming mode
> >>is
> >>used. Newer versions of zstd (1.3.2+) list the window size of a file
> >>with `zstd -lv <file>'. The absolute maximum amount of memory required
> >>is just over 8 MB.

> > And, pray tell, what are the actual results?  What is the trade-off of
> > kernel size versus decompression performance versus the other algorithms
> > that we already support?  Adding algorithms for their own sake is a bad
> > thing not a good thing.
> 
> Sorry I neglected to include the benchmarks I've run so far. I've included
> them below, and will add them to the next version's cover letter.
> 
> Comparing the command line tools on a kernel image that is 68970616 B large:
> 
> | Algorithm | Compression Ratio | Decompression MB/s |
> |-----------|-------------------|--------------------|
> | zstd      |              4.42 |              436.5 |
> | gzip      |              3.72 |              134.1 |
> | xz        |              4.83 |               53.1 |
> | lz4       |              3.18 |             1682.2 |
> | lzo       |              3.36 |              389.6 |
> | bzip2     |              4.03 |               33.3 |

Perhaps it'd be a good idea to cull some of bad algorithms?  I don't know
the memory used by those, but envelope of the table you just shown suggests
using bzip2 and lzo is pointless.  So is gzip, but it's widespread as the
default for initramfs producers, thus it'd be unsafe to kill it.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ We domesticated dogs 36000 years ago; together we chased
⣾⠁⢰⠒⠀⣿⡁ animals, hung out and licked or scratched our private parts.
⢿⡄⠘⠷⠚⠋⠀ Cats domesticated us 9500 years ago, and immediately we got
⠈⠳⣄⠀⠀⠀⠀ agriculture, towns then cities.     -- whitroth on /.

  reply	other threads:[~2017-10-11  0:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 21:22 Nick Terrell
2017-10-10 21:22 ` [PATCH 1/2] lib: " Nick Terrell
2017-10-10 21:22 ` [PATCH 2/2] x86: " Nick Terrell
2017-10-10 21:55 ` [PATCH 0/2] " hpa
2017-10-10 22:40   ` Nick Terrell
2017-10-11  0:08     ` Adam Borowski [this message]
2017-10-11  2:01       ` Nick Terrell
2017-10-11  3:12         ` 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=20171011000805.7b2nteb5hjbrfe7a@angband.pl \
    --to=kilobyte@angband.pl \
    --cc=Kernel-team@fb.com \
    --cc=clm@fb.com \
    --cc=cyan@fb.com \
    --cc=hpa@zytor.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

all inboxes | Powered by JetHome®