CHAPTER 31 Optimizing Your System (Adelphia web hosting)

CHAPTER 31 Optimizing Your System One slight problem with Ubuntu (and all Linux distributions) is that they take a one-sizefits- all approach the default installation attempts to provide services for the every kind of user. While this provides the widest range of compatibility, it doesn t always ensure an optimized system. You may never attach a printer to Ubuntu, for example, so what s the point of keeping the printing subsystem in memory? You can remove it from your Linux setup and not only free memory, but also speed up boot times, because you no longer need to wait for the printer service to start. While this might save only a couple seconds, or just a couple of hundred kilobytes of memory, repeating the process and paring Ubuntu down to the bone can produce an ultra-efficient system. In this chapter, you ll learn how to target the various subsystems of your Linux system in order to optimize and speed up your computer. We ll look at everything from bootup, to hard disks, to streamlining the kernel itself. Speeding Up Booting Let s take a look at what happens when a Ubuntu-equipped PC boots. Then we ll explore some ways to speed up the process. Understanding Bootup When you start your computer, initially, the computer s BIOS searches for a boot program on the hard disk. In the case of Ubuntu, the boot program runs the GRUB boot loader. If you ve installed Ubuntu alongside Windows (or any other operating system), the GRUB menu will appear at this stage, and you ll be able to choose which operating system to load. If only Ubuntu is on the hard disk, you ll see a brief prompt for three seconds telling you that the GRUB menu will appear if you press a key. However your system is set up, GRUB has the same fundamental function: it s designed to load the Linux kernel. The kernel then starts the very first program that s run on any Linux system: init. The principal job of init is to run a variety of run-level scripts, which load the hardware and software necessary for the full and correct functioning of the system. Two sets of run-level scripts run at this time: system initialization scripts, which are contained in /etc/rcS.d, and numbered run-level scripts, which are found in /etc/rcX.d (where X is the number of the current run level).

Leave a Reply