It’s been a month since I migrated my desktop from openRC to systemd and I wanted to write down and share my experience about it.

Firstly, I would like to clarify that I didn’t migrated to systemd because I dislike openRC or have any issues with it. I just wanted to get my hands dirty with systemd and learn from the whole procedure. I still have openRC to some of my boxes.

Intro

When systemd first appeared in 2010 there was much noise in mailing lists. Like every new software that grows rapidly , everyone was worried about the  maturity of systemd.  Almost four years  later since its first appearance,  systemd it’s not an immature project any more. It is already embraced by some distributions( openSUSE, Fedora, Arch) and became their default init system.  Unlike other distributions Gentoo doesn’t enforce  users to have an init system by default and allows them to choose what to install.

A brief introductory for both projects.

openRC:  dependency-based init system that works with the system provided init program and is maintained by Gentoo and Debian developers.  openRC is not only used in Linux systems, but it is also compatible with FreeBSD and NetBSD.

Systemd:  system and service manager for Linux.  Systemd was developed as  a contemporary replacement for SysVinit and RC. Systemd obsoletes ConsoleKit  and welcomes systemd-logind! In addition, it has its own cron and  logging system.

Only these? No!  There are a lot more init systems to play with,  see the  comparison  of init systems  page into Gentoo’s wiki.

Migration

Migration didn’t take much time and it was an interesting process. Although,  systemd’s architecture[1][2] differs from the SysVinit,  systemd’s surface has a similar logic compared to openRC and the only thing to be done is matching  systemd tools with openRC ones.

Tools

Here is a list with useful utilities that helps to a smoother systemd  landing.

  • systemctl: Control the systemd system and services.
  • hostnamectl: Control hostname.
  • localectl: Configure system local and keyboard layout.
  • timedatectl: Set  time and date.
  • systemd-cgls : Show  cgroup contents.
  • systemadm:  Front-end for systemctl command.

Matching systemd services with openRC ones.

  • systemctl list-units —> rc-status (List running services status)
  • systemctl –failed  —> rc-status –crashed ( Check failed / crashed units/services)
  • systemctl  –all —> rc-update -v show ( Display all available units/services)
  • systemctl {start,stop,restart,status} xyz —> /etc/init.d/xyz {start,stop,restart,status} ( {start,stop,restart,status} units/services immediately)
  • systemctl {enable,disable} xyz —> rc-update {add,del} xyz ( add or delete  a service/unit)

Goodbye syslog-ng / rsyslog (?)

No! Systemd has its own  logging system called journal.  However, syslog-ng or rsyslog can still be used in conjunction with journal.

To  manage journal logging system, use journalctl command.

Performance

For all the performance freaks out there, systemd comes with a very neat tool. systemd-analyze which analyzes system’s boot performance .

This tool, also comes with a great feature,  systemd-analyze blame which  prints all running units ordered by the time they took to initialize.

In addition, systemd-analyze plot generates a plot detailing all services that have been started and the time they spent on initialization.

For the same purposes, systemd-bootchart can be used to speed up boot performance.

Conclusion

I find both of them great projects with a bright future.  I am not going to start comparing them . As we always say on Gentoo “It’s all about choice”(sic).  Use openRC, use systemd, use whatever ease your life.

That’s all folks.
Thanks for your time.

I am looking forward to your feedback.

Further reading:

  • Thomas Kapoulas

    Still loving my OpenRC…

  • Drakevr

    This is an intro and migration guide not exactly what you would expect from a “demystifying foo” article but it does a pretty good job of explaining some of the basic concepts.
    (for OpenRC users at least.)

  • Sander Knopper

    Do you notice any significant performance improvements?

    • Pavlos Ratis

      Hi, I am using i3wm and LightDM and I cannot compare it with openRC since I am using low resource consuming apps. My shutdown is slightly faster ~1-2 seconds but that’s nothing.

  • eean

    I think people (myself very much included) were primed to be very skeptical of systemd after the rocky rollout of PulseAudio. systemd has the important advantage of not depending on device drivers not sucking. :) So it’s been smooth sailing with systemd technically, even if it’s somehow more politically controversial. It’s probably just easier to form an opinion on the init system than it is to grok Linux multimedia.