Tips and tweaks for reducing Linux startup time

Network Stack

The Linux kernel initializes the network stack very early, which also costs a little time. If you do not need IPv6, for example, disable the module by editing the /etc/default/grub file again and adding the ipv6.disable=1 option to the GRUB_CMDLINE_LINUX_DEFAULT line. After a reboot, the system only enables the IPv4 stack, which is often all you need on local networks.

Conclusions

The methods described in this article are useful for analyzing the boot process for a Debian installation. Including all the optimizations mentioned in the article, the home-built Linux kernel with integrated i915 driver starts the i8042 driver responsible for the laptop keyboard and touchpad before reaching the 300ms mark (Figure 4). The drivers for ACPI and the Intel graphics card now take the most time, although you could start the Intel driver asynchronously on some systems. Without the initcall_debug parameter, acpi_init takes a few milliseconds less. In all your optimization attempts, you should never forget that measuring can actually influence the measured values.

Figure 4: Following all the optimizations, loading the most important drivers now takes less than 300ms. The drivers for ACPI and the Intel graphics have the largest time share now.

Modern, powerful systems start faster than their predecessors, but they are still too slow considering the potential for savings. One reason for the sluggishness is that installations need to be as universal as possible and work on as many different systems as possible. However, as a normal user, you will not typically need all the features provided with a default system. If you want to take the time and effort, you can tailor the boot process for your own hardware. On a powerful modern system, you might be able to shave off a couple seconds, which could still make a difference to the user experience, but on an older computer with a longer boot time, these techniques could lead to far more significant reductions.

Infos

  1. "Increases size of initrd considerably since linking with OpenSSL": https://bugs.debian.org/930752

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Debian: 14 Seconds to Boot

    An article from the Debian-Administration.org community describes how to boot up Debian much faster on an Asus Eee 901. Its author, Phil Endecott, claims to do it within 14 seconds using his method.

  • Working with the Kernel

    If you work with third-party hardware drivers, or even if you just need to fix a broken system, someday you might need to upgrade the Linux kernel.

  • Knoppix 5.3.1: Lenny Basis, KDE 4.0 and Accessibility Software

    Klaus Knopper has released version 5.3.1 of his live Knoppix system. The codebase comes courtesy of Lenny, the next generation Debian.

  • ASK KLAUS!

    Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine. com

  • Optimizing the Kernel

    We explore some optimizations designed to deliver a smoother experience for desktop users.

comments powered by Disqus
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.

Learn More

News