Optimize boot time

You can use systemd to speed up your startup time. This recipe is not a definitive recommendation for which services may be expendable. Instead, it provides the overall method to test the impact of different services on your boot time.

How to do it...

Perform the following steps:

  1. Navigate to the systemd directory (root user) as follows:
    # cd /lib/systemd/system
    
  2. Next, determine how long your overall system is taking to get going with the following code:
    # systemd-analyze
    
  3. You can quickly figure out the pokier services. Just point the finger at them with the following command that reveals all the systemd services that are sorted by their boot times:
    # systemd-analyze blame
    
  4. From this output, you can immediately pinpoint some of the culprits. We will assume that you're running the current Debian distro, so you'll see things similar to the following command:
    wicd.service (7205ms)
    apache2.service (3430ms)
    wpa_supplicant.service (1938ms)
    ...
    
  5. Some of these may be expendable startup services and worth disabling. Experiment by disabling the different services and see how it affects your boot times. Here is an example:
    # systemd systemctl disable wicd.service
    
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.138.144