An introduction to the modern linux init system
Hosted by Clinton Roy on 2015-12-25 is flagged as Clean and is released under a CC-BY-SA license.
Listen in ogg,
mp3 format. | Comments (1)
1 What is systemd?
A dependency system for unix services.
And, a set of basic unix services to make a unix system usable.
And, a growing list of not quite so basic services
- NTP, networkd, timers (crond/atd)
From a programmers perspective, it's the mainloop phenomenon.
Solaris: Service Management Facility
Mac OSX: launchd
Ubuntu: upstart (until recently)
LSB (actually implements LSB deps)
- path (inotify triggers)
- timer (crond/atd)
- slice (cgroup)
- replace run levels
- default target at boot
- can isolate to just one target
5 Advantages - Design
Proper, explicit dependencies between system compontents
Starts components in parallel
A proper separation of concerns, lots of situations covered.
- configuration files are regular, simple to understand generally small
- OTOH, there are LOTS of options
Configuration is not runnable shell.
Separate system and user daemons.
6 Advantages - Sysadmins
Modify configuration without modifying upstream configuration
Service watching (startup, watchdog, failure modes)
[EXTENDED] /lib/systemd/system/rc-local.service → /lib/systemd/system/rc-local.service.d/debian.conf
[EXTENDED] /lib/systemd/system/systemd-timesyncd.service → /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf
[EQUIVALENT] /etc/systemd/system/default.target → /lib/systemd/system/default.target
3 overridden configuration files found.
7 Advantages - Programming
Removal of some error and security prone code
- socket activation (e.g. privileged ports)
- user/group changing
8 Advantages - Provisioning
standardized cgroup controls
debootstrap ; systemd-spawn-boot
* systemd takes care of all pseudo file systems for you
9 Advantages - Users
quick to boot
can reduce load later on (services start & stop as required)
- black = Requires
- dark blue = Requisite
- dark grey = Wants
- red = Conflicts
- green = After
systemd-analyze plot gdm.service
- It’s really nice in theory, but in practice I’ve found it to be slow and buggy
It’s a little new, so LTS distros necessarily have older versions
- el7 has something like 200 patches
network-online.target is a bit flakey
- Unix is a graveyard of IPC, I don't feel DBUS is much better
- KDBUS means it will probably be around for ever.
Deeply hooked into linux specific details, not portable
- kernel api, cgroups, udev etc.
Some cool features relient on file system e.g. btrfs for snapshot
I haven’t had a chance to play with networkd yet, but it sounds like it’s going to be very good.
- It depends…
- systemd only supports start/stop/reload
- work with the daemon: oneshot/simple/forking/inetd
- integrate with systemd: notify, watchdog
- Every login, a separate systemd -> user is spawned
- Can override with .config/systemd files
Comment #1 posted on 2015-12-29T23:01:07Z by Frank
Nicely done. I do appreciate the big picture overview; it provides a context and frame of reference that many stories I've read about SystemD do not.
<< First, < Previous, Next >, Latest >>
Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.
Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).