Back to the Overview

systemd on embedded devices

ELinOS, Linux

systemd is a system and service manager mainly used as an init system to start user space application and services. On traditional Linux distributions systemd already replaced the SysVinit. On embedded devices the scope is different because the systems are tailored to the user requirements to provide fast boot times, minimal disk space usage and a limited number of daemons and services.

ELinOS combines both worlds by providing a tailored and optimized configuration of the systemd unit and service files. This reduces the number of services only to the user selected components and saves disk space on the target. Furthermore, an advantage of systemd lies in its ability to parallelize processes at startup. This is interesting for embedded systems insofar as performance gains can be achieved in this way, which accommodates the usually tightly limited hardware in the embedded area. This manifests itself among other things in the boot process, which costs valuable time particularly with more complex setups with other daemons, because e.g., with daemons such as SysVinit (relatively) rigid “runlevels” (thus system states) are defined, instead of comparatively flexible target units (thus modular mounting of system components such as a file system), which are individualizable.

In addition, systemd increases the security by using Control Groups (cgroups) and containers. This allows separating applications and limiting resources. More info on the use of cgroups can be found in our blog post on cgroups.

systemd brings along a tool for boot optimization, which conveniently outputs references and times. With systemd-analyze it is possible to measure the boot time, separated by kernel and user space and to show via the blame parameter which service needs how much time. Also, a (vector-)graphic output is possible with the parameter plot > /[directory]/graphic.svg. Dependencies can be displayed with dot -Tsgv > /[directory]/graphic.svg and additionally extended with the name of the respective service, which one would like to regard exclusively. In addition, there are further parameters which help to optimize the boot process according to one's own wishes.

Using systemd for embedded systems is a profound way to optimize boot times and combined with cgroups and containers increases the security.

Find out more about the latest ELinOS Release