Making your embedded Linux systems boot faster
Cheap optimization techniques
Your products are running Linux. That’s great! That’s even greater when your users don’t even notice it. To make the OS as invisible as possible, the system should boot in a flash.
Are your products or prototypes are ready but still take too much time to boot? Is it too late to make significant and costly changes to system design? If so, we can help you to use cheap optimization techniques that can be applied late in the development process. They will make your system boot much faster without requiring any redesign. Here are some of the techniques we can apply:
- Analyzing time spent during the boot process, from the bootloader, to kernel initialization and early userspace.
- Simplifying the bootloader, or even skip it
- Reducing kernel startup time
- Choosing faster filesystems
- Simplifying startup scripts and running them in parallel. Increasing their performance
- Using lightweight shells and utilities
A customer of us asked us to perform a boot time audit on one of their systems. In the first 2 days, we managed to reduce boot time from 32 to 7 seconds! Here’s what we did:
- Rebuilt, and simplified the userspace infrastructure (excluding customer applications): using BusyBox init instead of SysV init, a persistent /dev, and simplifying startup scripts. This saved 22 seconds!
- Reduced jffs2 filesystem mount time by recompiling the kernel with the
CONFIG_SUMMARYoption. This saved 0.8 second. Reduced the number of pty terminals (64 instead of 256, saving 0.35 second)
- Removed an unnecessary decompression step in the bootloader (saved 1 second).
This was just an example. We have conducted multiple boot time reduction projects (look for “boot time” on our customers page).
We also added LZO decompression to the mainline Linux kernel, which allows to reduce kernel boot time by a few hundreds of milliseconds.
We typically propose 5 day audits to our customers. They allow us to get familiar with their system by trying to reduce boot time as much as we can. At the end of the audit, the customer receives a new root filesystem and kernel booting faster, together with a build environment to reproduce this (either an update to the customer’s original build system, or a switch to one yielding better results, if agreed by the customer). We also release complete documentation describing the steps we have taken and how to reproduce them.
The audit report continues by listing extra ways of further reducing boot time (now that we got very familiar with the customers system and its boot process), together with the corresponding development time and cost (for customers who choose to ask us to take care of these extra tasks).
If you are interested, it is also possible to add one day at your site to share the results with your teams and to transfer the knowledge, to make sure that people know how to reproduce the results by themselves. This also leaves enough time to start explaining and exploring remaining boot time reduction opportunities.
If you also need to make your systems boot faster, don’t hesitate to contact us and request an audit. We will do our best to impress you too.