LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Paul Menzel <pmenzel+linux-kernel@molgen.mpg.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: How to disable Linux kernel self-extraction (KERNEL_GZIP, KERNEL_BZIP2, …)?
Date: Sun, 22 Apr 2018 22:52:08 +0200	[thread overview]
Message-ID: <20180422205208.GA8672@amd> (raw)
In-Reply-To: <b22efb58-b63e-7130-f2d7-a9d28225ef9b@molgen.mpg.de>

[-- Attachment #1: Type: text/plain, Size: 2016 bytes --]

Hi!

> >>I try to decrease boot time, and my system has an SSD and enough space, so
> >>loading 18 instead of 12 MB doesn’t make a difference, but the
> >>self-extraction is noticeable. So, I like to disable it.
> >
> >How long does GZIP extraction take on your hardware?
> 
> It’s hard to measure – at least I didn’t find a way to do so –, but counting
> from the last GRUB message to the first message of Linux (with `quiet`
> removed from the the command line), it takes roughly *two* seconds.
> 
> ```
> $ ls -l /boot/vmlinuz-4.15.0-3-686-pae
> -rw-r--r-- 1 root root  3987200 Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686-pae
> $ ls -lh /boot/vmlinuz-4.15.0-3-686-pae
> -rw-r--r-- 1 root root 3,9M Apr 19 12:13 /boot/vmlinuz-4.15.0-3-686-pae
> $ time scripts/extract-vmlinux vmlinuz-4.15.0-3-686-pae > bla.txt
> 
> real    0m1,204s
> user    0m1,041s
> sys     0m0,245s
> ```

Interesting; looks like I have faster machine (thinkpad X220).

pavel@duo:/data/l/linux$ time scripts/extract-vmlinux /tmp/vmlinux.bin
> /tmp/delme
0.21user 0.15system 0.66 (0m0.660s) elapsed 56.36%CPU
pavel@duo:/data/l/linux$ ls -al /tmp/delme
-rw-r--r-- 1 pavel pavel 18275356 Apr 22 22:44 /tmp/delme
pavel@duo:/data/l/linux$ gzip /tmp/delme
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz
0.21user 0.02system 0.23 (0m0.232s) elapsed 100.03%CPU
pavel@duo:/data/l/linux$ gzip -1 /tmp/delme
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz
0.22user 0.03system 0.25 (0m0.257s) elapsed 100.11%CPU
pavel@duo:/data/l/linux$ time gzip -d /tmp/delme.gz

..and it also looks like extract-kernel is significantly slower than
gzip -9, because it is not using all the CPU. Strange.

Interesting. I somehow assumed gzip -d would be faster than that on
modern machines.

So yes, looks like uncompressed kernel image may be good idea.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-04-22 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 14:36 Paul Menzel
2018-04-22 10:20 ` Pavel Machek
2018-04-22 19:55   ` Paul Menzel
2018-04-22 20:52     ` Pavel Machek [this message]
2018-04-23 17:02       ` Pavel Machek
2018-04-24  2:08         ` Adam Borowski
2018-04-24  9:08           ` Paul Menzel
2018-04-24 23:06             ` Adam Borowski
2018-04-25  1:12             ` On Tue, Apr 24, 2018 at 11:08:34AM +0200, Paul Menzel wrote: Adam Borowski
2018-04-24  9:55           ` How to disable Linux kernel self-extraction (KERNEL_GZIP, KERNEL_BZIP2, …)? Pavel Machek

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=20180422205208.GA8672@amd \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pmenzel+linux-kernel@molgen.mpg.de \
    --cc=x86@kernel.org \
    --subject='Re: How to disable Linux kernel self-extraction (KERNEL_GZIP, KERNEL_BZIP2, …)?' \
    /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

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).