Ubuntu – Systemd is really slow in comparison to upstart

bootupstart

I have been using Ubuntu for a long time now, this is what happened when I use:

Systemd:
It performs really bad using systemd: it uses 95% of the CPU all the time and the PC gets really hot. Also it takes a really long time to boot (about 1.5 min, and sometimes it does not boot at all as it has a black screen at boot.)

Upstart:
When I tried the upstart options at boot, it performs as expected, booted in seconds, and it was awesome as it should be.

Laptop:

  • AMD A8
  • Radeon
  • SSD

Questions:

  1. Why does upstart perform better than systemd?
  2. How can I debug systemd?
  3. Should I switch to upstart? If yes, how do I do it?

Best Answer

1- Why:

Upstart's model for starting processes is greedy event-based, all available jobs whose startup events happen are started as early as possible. During boot, upstart synthesizes some initial events like startup or rcS as the tree root, the early services start on those, and later services start when the former are running.

Systemd's model for starting processes is lazy dependency-based, a unit will only start if and when some other starting unit depends on it. During boot, systemd starts a root unit, which then transitively expands and starts its dependencies.

2- systemd-debug-generator

Is a generator that reads the kernel command line and understands three options:

systemd.mask= option

Followed by a unit name,this unit is masked for the runtime. This is useful to boot with certain units removed from the initial boot transaction for debugging system startup.

systemd.wants= option

Followed by a unit name, this unit is added to the initial transaction. This is useful to start one or more additional units at boot.

systemd.debug-shell option

The debug shell service "debug-shell.service" is pulled into the boot transaction. It will spawn a debug shell on tty9 during early system startup.

3- To do so:

Select the Advanced options for Ubuntu at the boot prompt when your computer starts.

Then, select the Ubuntu, with Linux ... (upstart) entry.

However, this will work only for the current session

So if you want to make it permanent, you'll have to install the upstart-sysv package.

Source