Optimize Linux system services to improve boot speed

Source: Internet
Author: User
Article Title: optimize Linux system services to improve boot speed. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
This article describes how to speed up Linux boot without affecting availability. Of course, this method requires you to understand the dependency between system services and services. If they can be started in parallel, let them start in parallel instead of in serial mode.

There is no doubt that Linux is a good system, but it still cannot get rid of a common criticism (especially from people with a Microsoft Windows background ), it takes too long for the Linux system to start using the "on" key. In fact, they are right. Linux does need a long boot time.

Although the technology I described here to speed up Linux boot is easy to understand, the real implementation requires caution. I hope Linux publishers can use this method, so that users can save those configuration tasks. However, if you are adventurous, read this article.

Before you start
If you want to try this method, you must first be familiar with the Linux configuration script. Modifying the system startup settings may cause danger or even cause your system to fail to start. In this case, restart the machine and enter single-user mode (runtime level 1), restore your modifications, and restart. Always remember to back up all the files you have modified. To prevent the worst case, you need at least one system backup image.

I strongly recommend that you modify an insignificant test system before considering using the method I suggest to modify a formal system. If you only have one machine, you can use the User Mode Linux tool. UML is a kernel patch. It can compile the Linux kernel into a binary file, and then you can run the kernel like running a common program. That is to say, you can run a complete Linux system as a process on top of your normal system. You can think of it as a normal systemMediumRun a Linux system. (Refer to the references at the end of this article to find the sites where you can download UML andDeveloperWorksUML tutorials on the website ).

With UML, you can work on a test system. Even if you completely destroy the test system, it will not affect your normal system.

Overview
The first part of this article describes how a Linux system can be started in the background after the Linux kernel (the "core" of the Linux machine) is loaded. Then we will introduce the technology to speed up your system boot.

If you are familiar with running-level and service startup scripts, you may want to jump directly to the limitations of the traditional service framework.

Linux boot sequence and Operation Level

The boot process of a Linux system can be divided into several stages. This article does not explain all the different stages, because we only care about the phase after the kernel is loaded.

You can run the/sbin/runlevel command to determine the current running level of your system. (For more information, see man runlevel ).

The/sbin/init program is called when the kernel is loaded and started to run. This program runs as root and is set to "running level" as required during start guide ". (

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.