Top 10 notes for faster Linux Startup

Source: Internet
Author: User
The top ten precautions make Linux boot faster-general Linux technology-Linux technology and application information. The following is a detailed description. [IT168 Forum collection] Linux needs to be restarted rarely. However, once necessary, the startup is often slow. Fortunately, there are some acceleration methods. Some of these methods are not difficult. (Unfortunately, there are some difficulties ). Let's take a look.

1: Undo redundant services
Many services are not required according to the purpose of the machine. If Linux is only used as a desktop, sendmail, httpd, and many other services are not required. If your server is only a Web server, you can also turn off many services. To do this, go to the management menu and check the service items. You only need to cancel all service options that you do not want to start.

2: Undo redundant Kernel Modules
If your desktop is connected to Ethernet, you do not need to load the wireless kernel module. This is a relatively difficult task. It may be necessary to re-compile the kernel, but it is not easy to compile the kernel. For this reason, you probably need the kernel source code. Next, follow the standard steps for compiling the kernel. The difference is that you need to search the system and remove all unnecessary modules.

The best way to identify the kernel modules currently installed and running in the system is to install Bootchart. It not only gives you a list of suitable modules, but also describes what happened during system startup. You can also issue the command: chkconfig? List | grep 3: on to find out what services are running. Once you know what modules are not required, you can remove them during kernel re-compilation. As long as this processing is done, the compiled kernel is perfect for your architecture.

3: replace GNOME or KDE with the light window manager
The reason why I inserted the small footprint window manager is that they greatly reduce the startup time of the image (interface. Instead of having to wait 30 to 60 seconds for GNOME or KDE to start. Why not wait 2 to 10 seconds for Enlightenment or XFCE to start? They not only save startup time, but also save memory and save the headache of dealing with bloatware.

4: Use text-based logon instead of graphical Logon
Most of my Linux machines start run level 3 instead of run level 5. This running level will be stopped in text login mode. I will log on to this location and issue the startx command to start selecting the desktop. The graphic login mode does two things: increasing the loading time and causing a headache, that is, trying to break away from the poor X windows.

5: Use a lightweight release
Do not load heavy-duty Fedora. Why not try Gentoo, Arch, or Puppy Linux? These smaller releases start much faster than the bloated Fedora (or even Ubuntu. In large releases, OpenSuSE claims to be the fastest to start, but I have not tried it myself. Between the latest Fedora and Ubuntu, Ubuntu beat the start time (out-of-the-box) of Fedora ).

6: use Open BIOS
If you are smart and competent to upgrade the PC firmware, you can consider migrating to the open-source BIOS. An additional note: The Use of Open Firmware allows Linux to initialize hardware (not relying on BIOS) during startup ). Most importantly, many enable BIOS settings can meet the special needs of machines. If you do not want to enable the BIOS, you can at least set the BIOS to not find a non-existent floppy disk drive, that is, directly start the first hard disk drive (not the CD drive first ).

7. Avoid DHCP
If you work on a residential Network (or a small enterprise network) where the address lease is not a problem, the machine uses a static IP address. This prevents the machine from accessing the DHCP server to obtain the IP address. If you use this method, make sure that the configuration file/etc/resolve. conf also expresses your DNS server address.

8: Hot swapping is free of charge
Hot swapping is a system that allows new devices to be plugged in and used immediately. If you know that your server does not need such a system, delete it. This reduces the startup time. In many systems, hot swapping consumes a lot of startup time. Removing hot swapping will change depending on the release version you are using. Note: In most cases, udev has replaced hot swapping. However, if you are still running an older release version, it is appropriate to do so.

9: If you are bold and fearless, try initng.
The initng system acts as a replacement for the sysvinit system and promises to completely reduce the startup time of UNIX-like operating systems. If you want to know about the initng System in the running state, you can try Pingwinek LiveCD.

10: use the code of Debian
If you are using Debian, one line can be used to convert your startup script into a simple code that runs in parallel. If you check the/etc/init. d/rc Script, you can see that CONCURRENCY = none exists in around 24 rows. Change this line to CONCURRENCY = shell, and you may see a decrease in startup time.

This is probably the case. Of course, there will always be more and better hacks there. However, most of the above should be the most important. The good news is that you may have already run Linux, so very little restart can reduce the burden of startup time.
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.