Achieving Faster Linux Boot Time: 2013 Version
Some things change, some do not
Recently I had an opportunity to present a technical session titled “Achieving Faster Boot Time with Linux”. As I reviewed my slides for the last time before the session, it dawned on me that much of what I was about to present was little changed over the last few years. I gave a similar presentation at Freescale Technology Forum several years ago.
Over the last few years, many elements of a basic embedded Linux system have either evolved, been replaced or are downright new. Some examples of this rapid evolution of technology include the following:
- Migration away from System V init to the more performance-oriented systemd initialization system
- udev being rolled into systemd
- Linux kernels starting with the major version number 3 instead of 2
- Multi-core processors are now commonplace in embedded Linux devices rather than exceptional
- UBI/UBIFS has largely displaced JFFS2 as the embedded Flash file system of choice
The list of things that are new or different could fill the rest of this page. But what struck me as I reviewed my slides was that much of what I described at the FTF event several years ago was still very relevant today.
One of the primary messages then and now is still true. Linux boot time can be dramatically improved without substantial engineering effort. Several of the techniques I presented are easy to achieve and don’t require extraordinary skill or super human effort. Some techniques are tedious and may take some trial and error, such as reducing unnecessary features and device drivers in the Linux kernel. But many are easy to apply and result in significant improvement in boot time.
Optimizing U-Boot requires at least some knowledge of U-Boot’s architecture and build system, but anyone competent in boot-style firmware can make quick progress reducing U-Boot’s footprint and thus reducing load and execution time.
Of course, achieving very aggressive Linux boot times down in the 1-2 second range or less requires advanced techniques and substantial skill in many aspects of Linux systems. Each architecture and platform presents unique challenges. Mentor Embedded has developed significant experience building fast boot Linux systems, using a variety of interesting techniques and technologies. Many of these techniques and technologies can be found in production vehicles today.
Attached to this blog post is a link of the presentation I gave at the IESF 2013 event in Detroit this year. Several attendees asked for a copy so I thought I’d post it here:
- AMD R-Series and Mentor Embedded Linux – My Embedded Graphics Playground
- strace: My Favorite Tool for Debugging and Profiling Linux Applications
- Achieving Faster Linux Boot Time: 2013 Version
- BeagleBone and 6502 – The Ultimate Geek Toys
- Fun with toolchain versions
- More on Yocto Terminology – recipes and packages
- Yocto versus Poky versus Angstrom, etc
- Thoughts on Embedded Linux Terminology
- Welcome to my little corner of the world