What would be the approach to improve (shorten) boot time on a device?
Is it possible to disable a non needed service on host OS? For example disable bluetooth service if you don’t need it.
hey @MatejFranceskin when you say boot time, do you mean time until your services start to run? We had an issue with balenaEngine where even after the system was all up and ready, it would wait up to ~7min for a kernel event.
That was fixed in balenaOS v2.29.0 however…
Yes, I mean time until my services start to run. Currently they take about 1:40 on Raspberry PI with v2.29.0. Is that normal or is there something that can be done?
Hi @MatejFranceskin,
What Raspberry Pi board version are you using?
Also, are you using a single container or a multicontainer app?
Regards!
Hi @MatejFranceskin, to expand on @spanceac’s answer, boot time is affected by a variety of factors. I think 1:40 is not unusual, especially if you’re starting several containers and/or something that has a big CPU load or requires loading large things from disk.
One of the biggest factors for this though is SD card speed. What SD card are you measuring this with? Using a faster SD card will usually have a noticeable effect on boot time.
I don’t think there’s any non-essential services that are started in the host OS before the balena engine, so I don’t see much room for optimization there…
Also, how are you checking the moment your services start running? Are you looking at functionality from your app, or the time the logs show up on the balenaCloud dashboard? If it’s the latter, keep in mind these are only sent when the supervisor starts, which is generally after your containers are started, so the actual start time is shorter than what you can see by looking at the logs.