Speeding Up Boot Time


The default init scripts found in /etc/init.d/ and the /etc/rc*.d/ directories are good for most systems, but they may not be needed on your specific system. If you do not need a service then you can disable it. This can reduce the boot time for your system. In some cases, it can also speed up the overall running speed by freeing resources. Use sysv-rc-conf (sudo apt-get install sysv-rc-conf) to change the enable/disable settings. Some of the services to consider disabling include:

  • anacron-As mentioned earlier, this subsystem periodically runs processes. You may want to disable it and move any critical services to cron.

  • atd and cron-By default, there are not at or cron jobs scheduled. If you do not need these services, then they can be disabled. Personally, I would always leave them enabled since they take relatively few resources.

  • apmd-This service handles power management and is intended for older systems that do not support the ACPI interface. It only monitors the battery. If you have a newer laptop (or are not using a laptop), then you probably do not need this service enabled.

  • acpid-The acpid service monitors battery levels and special laptop buttons such as screen brightness, volume control, and wireless on/off. Although intended for laptops, it can also support some desktop computers that use special keys on the keyboard (for example, a www button to start the browser). If you are not using a laptop and do not have special buttons on your keyboard, then you probably do not need this service.

  • bluez-utiles-This provides support for BlueTooth devices. If you don't have any, then this can be disabled.

  • dns-clean, ppp, and pppd-dns-These services are used for dynamic, dial-up connections. If you do not use dialup, then these can be disabled.

  • hdparm-This system is used to tune disk drive performance. It is not essential and, unless configured, does not do anything. The configuration file is /etc/hdparm.conf and it is not enabled by default.

  • hplip-This provides Linux support for the HP Linux Image and Printing system. If you do not need it, then it can be disabled. Without this, you can still print using the lpr and CUPS systems.

  • mdadm, mdadm-raid, and lvm-These provide file system support for RAID (mdadm and mdadm-raid) and Logical Volume groups (lvm). If you do not use either, then these can be disabled.

  • nfs-common, nfs-kernel-server, and portmap-These are used by NFS-they are only present if you installed NFS support. If you do not need NFS all the time, then you can disable these and only start the services when you need them:

     sudo /etc/init.d/portmap start sudo /etc/init.d/nfs-common start sudo /etc/init.d/nfs-kernel-server start 
  • pcmcia and pcmciautils-These provide support for PCMCIA devices on laptops. If you do not have any PCMCIA slots on your computer, then you do not need these services.

  • powernowd and powernowd.early-These services are used to control variable-speed CPUs. Newer computers and laptops should have these enabled, but older systems (for example, my dual-processor 200 MHz PC) do not need it.

  • readahead and readahead-desktop-These services are used to preload libraries so some applications will initially start faster. In a tradeoff for speed, these services slow down the initial boot time of the system and consume virtual memory with preloaded libraries. If you have limited RAM, then you should consider disabling these services.

  • rsync-This is a replacement for the remote copy (rcp) command. Few people need this-it is used to synchronize files between computers.

  • vbesave-This services monitors the Video BIOS real-time configuration. This is an ACPI function and is usually used on laptops when switching between the laptop display and an external display. If your computer does not support APCI or does not switch between displays, then you do not need this service.

Tip 

There is a System image from book Admin image from book Services applet for enabling and disabling some services. However, this applet only knows of a few services; it does not list every available service. The sysv-rc-conf command recognizes far more services and offers more management options.

The sysv-rc-conf command shows most of the system services. However, it does not show all of them. If the service's name ends with .sh, contains .dpkg-, or is named rc or rcS, then it is treated as a non-modifiable system service. To change these services, you will need to manually modify the /etc/init.d/ and /etc/rc*.d/ directory contents.

image from book
Leave It On!

Although there are many services that you probably do not need, there are a few that are essential. You should not turn off these essential services unless you really know what you are doing:

  • dbus-Provides messaging services.

  • gdm-This is the Gnome Desktop. Only disable this if you do not want a graphical desktop.

  • klogd-This is the kernel log daemon. Removing it disables system logging.

  • makedev and udev-These create all device nodes.

  • module-init-tools-Loads kernel modules specified in /etc/modules.

  • networking and loopback-These start and stop the network. Disabling removes the network configuration at boot.

  • procps.sh-Any kernel tuning parameters added to /etc/sysctl.conf are processed by this service.

  • urandom-This seeds the real random number generator that is used by most cryptographic system. You should leave it enabled.

As a rule of thumb, if you do not know what it is, then leave it on. Also, if the service only runs in single-user mode (rcS) that it is usually smart to not change it. Single user mode is where you should go when everything fails in order to repair the system.

image from book



Hacking Ubuntu
Hacking Ubuntu: Serious Hacks Mods and Customizations (ExtremeTech)
ISBN: 047010872X
EAN: 2147483647
Year: 2004
Pages: 124
Authors: Neal Krawetz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net