Improving boot performance with Bootchart
What to Cut
When optimizing boot times, you will mainly be interested in the vectors between various processes starting on the vertical axis. How long does a process wait before it allows the next process to start? Do some processes block the boot procedure for an excessively long time? Do I have any options for parallelizing some of the boot processes?
On the horizontal axis you will want to see whether you really need all the active processes. To do so, first correctly identify the processes and evaluate their functions; however, do not uninstall the programs or move their init scripts (e.g., hwclock.sh) to another directory until you are absolutely certain that your system does not need the process to survive. These optimizations involved very little effort and reduced the boot time in our lab from 33 to 26 seconds (Figure 3) – all without massively invasive system tweaking.
No universal recipe exists for accelerating the boot process. Many Linux distributions use Bootchart to optimize the boot time for the default installation, but you are likely to find even more time-saving options on your own computer. In our lab, we uninstalled Samba, Tor/Privoxy, and Bluetooth and moved the hwclock.sh init file to reduce the boot time. If you only print occasionally, you don't need to launch CUPS when you boot the system; instead, you could disable the CUPS daemon by default and move the start script out of the /etc/init.d/ folder. The same principle applies to other services that you only use occasionally – but remember to create backup copies before you make any changes to the scripts.
After taking care of the more obvious choices, such as disabling various automatically loaded services, you need to tackle some of the more complicated options for accelerating the boot process. These subtler alternatives mainly relate to the kernel and other system components.For example, you could build in hardware support modules and completely do without initrd and initramfs. Doing without hwclock, the tool that sets the system clock, is not as significant, but it could still save you some time. Then, once the system boots, cron could handle this job on a regular basis.
Hardware optimization options include booting the CPU at the fastest supported clock speed (if this is not done automatically). Also, you can save time with the Udev daemon: Whenever a machine is booted, the daemon tries to detect and enable all the devices. To save yourself this long-winded search, run a script by Phil Endecott (the guy who optimized Debian to 14 seconds) to automatically mount all the devices it has detected in /dev at boot time. However, this optimization comes at the price of losing the flexibility of plugging in new hardware.
Conclusions
Bootchart does not give you specific tips for accelerating your system boot time, but it does show you what is slowing the system down. Then you need to draw your own conclusions to know where to tweak the boot process. Of course, there is always the danger of optimizing your system to death and losing any time you gained in complicated repairs. Before you do anything serious, make sure you know exactly what effect the change will have on your system.
Infos
- Moblin boots in five seconds: http://www.linuxdevices.com/news/NS7654890804.html
- Bootchart: http://www.bootchart.org
« Previous 1 2
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.