5

I have Devuan Ascii with SysVinit installed. I see that the openRC version is much older in Devuan ascii repository. Has anyone tried Devuan with openRC? Is the parallel starts enabled for openRC?

Confguy2016
  • 211
  • 1
  • 6

1 Answers1

6

tl;dr

Yes, it can be, but it is slower and less efficient than the default sysvinit setup.

The Default (sysvinit)

A default Devuan Ascii installation already does parallel bootup with insserv and startpar. These work by parsing LSB headers in initscripts (take a look inside /etc/init.d) that explicitly specify dependencies. When you run sudo insserv, insserv processes these init scripts into files such as /etc/init.d/.depend.boot, /etc/init.d/.depend.start, etc. On bootup, startpar reads these scripts and starts processes in parallel according to these rules.

For example, here is my bootchart with sysvinit (booting to a console): sysv bootchart

OpenRC (unoptimized)

Installing OpenRC is done like any other package:

$ apt update
$ apt install openrc

After installation, it will tell you:

**********************************************************************
*** WARNING: if you are replacing sysv-rc by OpenRC, then you must ***
*** reboot immediately using the following command:                ***
for file in /etc/rc0.d/K*; do s=`basename $(readlink "$file")` ; /etc/init.d/$s stop; done
**********************************************************************

Run that as superuser.

In the process of installation, apt will remove insserv and startpar.

However, at least in my experience, OpenRC is slower than augmented sysvinit due to the fact that OpenRC calculates dependencies at boot time, as opposed to insserv which does so at package-install time.

For example, here is my bootchart with OpenRC, which is 1.57 seconds slower: openrc unoptimized bootchart

OpenRC (optimized)

If we want to go further, we can add the line rc_parallel="YES" to /etc/rc.conf. However, this mangles the startup output for a minimal gain in startup time, which is still slower than insserv+startpar: openrc optimized bootchart

This is because OpenRC is still using the LSB init scripts written in shell, as opposed to setups more optimized for it using openrc-run. Even with an updated version of OpenRC with openrc-init used instead of sysvinit, the bootup times are still worse.

novice
  • 419
  • 3
  • 12