All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: yocto@lists.yoctoproject.org, sateesh0457@gmail.com
Subject: Re: [yocto] Disabling unused service to reduce boot time (Krikstone version)
Date: Thu, 28 Nov 2024 14:38:39 +0100	[thread overview]
Message-ID: <90e74fef-e017-45df-9309-4fa2968afff7@topic.nl> (raw)
In-Reply-To: <JHN1.1732688730575421161.q61g@lists.yoctoproject.org>

If you're serious about boot time (and image size) reduction, your first step 
should be to create your own DISTRO and your own image recipe. Scrap those 
first words actually, I think this should be the first step in anything that's 
to become a real product.

It's much more efficient to start empty en add what you need, then to start 
with an everything-but-the-kitchen-sink image and then try to remove things 
without breaking other things.

Putting things in ":remove" overrides is not going to work as you expect. If 
package X has a run-time dependency on package Y, then package Y will be 
installed regardless of whether you added a bunch of ZZZ:remove += "Y" in some 
places. To get rid of Y, you'll have to remove or alter X.

Also start with analyzing your boot time. I've seen projects where people 
spent weeks on removing services and gaining less than a second, while they 
left a "bootdelay" active in U-boot. Of total 10 seconds boot time, three 
seconds were spent twidling thumbs in U-boot. That's a 30% boot time 
improvement in less than an hour's work.

A raspberrypi 4 for example will spend about 5 seconds in its closed-source 
firmware at boot. Some things are just beyond your control.

On many embedded devices boot time is dominated by the IO speed of the boot 
device. Just changing your rootfs type from ext4 into LZ4-compressed squashfs 
often reduces the boot time noticably.

When using systemd, "systemd-analyze criticalpath" should be your starting point.

M.

On 27-11-2024 07:25, sateesh m via lists.yoctoproject.org wrote:
> Hi Team,
> I want to improve my boot time so for that I want to disable few services 
> which is running during boot up. I want to disable below mentioned services.





      parent reply	other threads:[~2024-11-28 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27  6:25 Disabling unused service to reduce boot time (Krikstone version) sateesh m
2024-11-27  7:01 ` [yocto] " Gyorgy Sarvari
2024-11-27  7:25 ` Markus Volk
2024-11-27  8:48   ` sateesh m
2024-11-27  9:39     ` sateesh m
2024-11-27 10:39       ` Gyorgy Sarvari
2024-11-27 12:30 ` Alex Kiernan
2024-11-28 13:38 ` Mike Looijmans [this message]

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=90e74fef-e017-45df-9309-4fa2968afff7@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=sateesh0457@gmail.com \
    --cc=yocto@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.