+ All Categories
Home > Documents > Beyond Init: systemd

Beyond Init: systemd

Date post: 12-Sep-2021
Category:
Upload: others
View: 10 times
Download: 0 times
Share this document with a friend
46
Beyond Init: systemd LinuxKongress 2010 Lennart Poettering [email protected] September 2010 Lennart Poettering Beyond Init: systemd
Transcript
Page 1: Beyond Init: systemd

Beyond Init: systemd

LinuxKongress 2010

Lennart [email protected]

September 2010

Lennart Poettering Beyond Init: systemd

Page 2: Beyond Init: systemd

Who Am I?

Software Engineer at Red Hat, Inc.

Developer of PulseAudio, Avahi and a few other Free Softwareprojects

http://0pointer.de/lennart/

[email protected]

IRC: mezcalero

Lennart Poettering Beyond Init: systemd

Page 3: Beyond Init: systemd

“systemd is a system and session manager for Linux,

compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 4: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts.

systemd provides aggressiveparallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 5: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities,

uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 6: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services,

offers on-demand starting of daemons, keepstrack of processes using Linux cgroups, supports snapshotting and

restoring of the system state, maintains mount and automountpoints and implements an elaborate transactional

dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 7: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons,

keepstrack of processes using Linux cgroups, supports snapshotting and

restoring of the system state, maintains mount and automountpoints and implements an elaborate transactional

dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 8: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups,

supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 9: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state,

maintains mount and automountpoints and implements an elaborate transactional

dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 10: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points

and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 11: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic.

It can work as a drop-inreplacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 12: Beyond Init: systemd

“systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

replacement for sysvinit.”

Lennart Poettering Beyond Init: systemd

Page 13: Beyond Init: systemd

init(8)

Lennart Poettering Beyond Init: systemd

Page 14: Beyond Init: systemd

Parallelization

Lennart Poettering Beyond Init: systemd

Page 15: Beyond Init: systemd

Lennart Poettering Beyond Init: systemd

Page 16: Beyond Init: systemd

Socket-Based Activation

The kernel orders and buffers requests for us!

Implicit dependencies!

Patching daemons

Lennart Poettering Beyond Init: systemd

Page 17: Beyond Init: systemd

Socket-Based Activation

The kernel orders and buffers requests for us!

Implicit dependencies!

Patching daemons

Lennart Poettering Beyond Init: systemd

Page 18: Beyond Init: systemd

Socket-Based Activation

The kernel orders and buffers requests for us!

Implicit dependencies!

Patching daemons

Lennart Poettering Beyond Init: systemd

Page 19: Beyond Init: systemd

Socket-Based Activation

The kernel orders and buffers requests for us!

Implicit dependencies!

Patching daemons

Lennart Poettering Beyond Init: systemd

Page 20: Beyond Init: systemd

Bus-Based Activation

Lennart Poettering Beyond Init: systemd

Page 21: Beyond Init: systemd

Starting Less: On-Demand Loading

Lennart Poettering Beyond Init: systemd

Page 22: Beyond Init: systemd

Parallelizing File System Jobs

autofs!

Lennart Poettering Beyond Init: systemd

Page 23: Beyond Init: systemd

Parallelizing File System Jobs

autofs!

Lennart Poettering Beyond Init: systemd

Page 24: Beyond Init: systemd

Shell is evil

Move to systemd, daemons, kernel, udev, . . .

Provide proper debugging facilities

Lennart Poettering Beyond Init: systemd

Page 25: Beyond Init: systemd

Shell is evil

Move to systemd, daemons, kernel, udev, . . .

Provide proper debugging facilities

Lennart Poettering Beyond Init: systemd

Page 26: Beyond Init: systemd

Shell is evil

Move to systemd, daemons, kernel, udev, . . .

Provide proper debugging facilities

Lennart Poettering Beyond Init: systemd

Page 27: Beyond Init: systemd

The best babysitter.

Control Groups!

Lennart Poettering Beyond Init: systemd

Page 28: Beyond Init: systemd

The best babysitter.

Control Groups!

Lennart Poettering Beyond Init: systemd

Page 29: Beyond Init: systemd

The best babysitter II

Environment, resource limits, working directory, chroot(), umask,OOM adjustment, nice level, IO priority and class, CPU schedulerpriority and policy/reset-on-fork, CPU affinity, timer slack, stdio tosyslog/tty/null/kmsg, uid, gid, supplementary groups, file system

namespacing (r/o file systems, inaccessible systems, mountpropagation, private /tmp), capabilities (inherited set, bounding

set, secure bits), . . .

Lennart Poettering Beyond Init: systemd

Page 30: Beyond Init: systemd

The best babysitter II

Environment, resource limits, working directory, chroot(), umask,OOM adjustment, nice level, IO priority and class, CPU schedulerpriority and policy/reset-on-fork, CPU affinity, timer slack, stdio tosyslog/tty/null/kmsg, uid, gid, supplementary groups, file system

namespacing (r/o file systems, inaccessible systems, mountpropagation, private /tmp), capabilities (inherited set, bounding

set, secure bits), . . .

Lennart Poettering Beyond Init: systemd

Page 31: Beyond Init: systemd

Unit types: service, socket, device, mount, automount, target,snapshot, timer, swap, path

Lennart Poettering Beyond Init: systemd

Page 32: Beyond Init: systemd

Don’t reinvent the wheel:

Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

support double-fork()ing daemons.

.desktop files.

Lennart Poettering Beyond Init: systemd

Page 33: Beyond Init: systemd

Don’t reinvent the wheel:

Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

support double-fork()ing daemons.

.desktop files.

Lennart Poettering Beyond Init: systemd

Page 34: Beyond Init: systemd

Don’t reinvent the wheel:

Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

support double-fork()ing daemons.

.desktop files.

Lennart Poettering Beyond Init: systemd

Page 35: Beyond Init: systemd

Snapshots

Lennart Poettering Beyond Init: systemd

Page 36: Beyond Init: systemd

Transaction System

Lennart Poettering Beyond Init: systemd

Page 37: Beyond Init: systemd

D-Bus!

Lennart Poettering Beyond Init: systemd

Page 38: Beyond Init: systemd

systemadm

Lennart Poettering Beyond Init: systemd

Page 39: Beyond Init: systemd

systemd as basic OS building block

systemd for cross-distribution standardization

Lennart Poettering Beyond Init: systemd

Page 40: Beyond Init: systemd

systemd as basic OS building block

systemd for cross-distribution standardization

Lennart Poettering Beyond Init: systemd

Page 41: Beyond Init: systemd

systemd in the distributions

Lennart Poettering Beyond Init: systemd

Page 42: Beyond Init: systemd

Future: managing sessions

Lennart Poettering Beyond Init: systemd

Page 43: Beyond Init: systemd

Say No! to Copyright Assignment.

Lennart Poettering Beyond Init: systemd

Page 44: Beyond Init: systemd

That’s all, folks.

Any questions?

Lennart Poettering Beyond Init: systemd

Page 45: Beyond Init: systemd

That’s all, folks.

Any questions?

Lennart Poettering Beyond Init: systemd

Page 46: Beyond Init: systemd

systemd

http://www.freedesktop.org/wiki/Software/systemd

http://0pointer.de/blog/projects/systemd

git://anongit.freedesktop.org/systemd

#systemd on irc.freenode.org

Lennart Poettering Beyond Init: systemd


Recommended