1 |
On Sat, Mar 17, 2012 at 6:48 PM, Nikos Chantziaras <realnc@×××××.com> wrote: |
2 |
> On 17/03/12 13:53, Alan Mackenzie wrote: |
3 |
>> |
4 |
>> Hello, Nikos. |
5 |
>> |
6 |
>> On Sat, Mar 17, 2012 at 08:25:48AM +0200, Nikos Chantziaras wrote: |
7 |
>> |
8 |
>>>> Happy Computer Users, systemd is on your horizon. |
9 |
>> |
10 |
>> |
11 |
>>> No, we don't. I hope systemd arrives soon. It's the best init system I |
12 |
>>> ever saw. |
13 |
>> |
14 |
>> |
15 |
>> What's so good about it? What will it do for me? |
16 |
>> |
17 |
>> I have this horrible sneaking suspicion that it will be more complicated |
18 |
>> than /sbin/init + OpenRC, just like udev + initramfs is more complicated |
19 |
>> than udev, and CUPS is more complicated than classical lpr. |
20 |
>> |
21 |
>> Why do you find it so good? |
22 |
> |
23 |
> |
24 |
> No idea. I only posted this because the OP didn't say what's bad about |
25 |
> systemd :-) I really don't know I should care whether my system runs OpenRC |
26 |
> or systemd. |
27 |
|
28 |
Take this with a grain (or a kilo) of salt, since I'm obviously |
29 |
biased, but IMHO this are systemd advantages over OpenRC: |
30 |
|
31 |
* Really fast boot. OpenRC takes at least double the time that systemd |
32 |
does when booting, easily verifiable. In my laptop systemd is twice as |
33 |
fast as OpenRC; in my desktop is three times faster. |
34 |
|
35 |
* Really parallel service startup: OpenRC has never been reliable on |
36 |
parallel service startup; its documentation says it explicitly. |
37 |
|
38 |
* Really simple service unit files: The service unit files are really |
39 |
small, really simple, really easy to understand/modify. Compare the 9 |
40 |
lines of sshd.service: |
41 |
|
42 |
$ cat /etc/systemd/system/sshd.service |
43 |
[Unit] |
44 |
Description=SSH Secure Shell Service |
45 |
After=syslog.target |
46 |
|
47 |
[Service] |
48 |
ExecStart=/usr/sbin/sshd -D |
49 |
|
50 |
[Install] |
51 |
WantedBy=multi-user.target |
52 |
|
53 |
with the 84 of /etc/init.d/sshd (80 without comments). |
54 |
|
55 |
* Really good documentation: systemd has one of the best |
56 |
documentations I have ever seen in *any* project. Everything (except |
57 |
really new, experimental features) is documented, with manual pages |
58 |
explaining everything. And besides, there are blog posts by Lennart |
59 |
explaining in a more informal way how to do neat tricks with systemd. |
60 |
|
61 |
* Really good in-site customization: The service unit files are |
62 |
trivially overrided with custom ones for specific installations, |
63 |
without needing to touch the ones installed by systemd or a program. |
64 |
With OpenRC, if I modify a /etc/init.d file, chances are I need to |
65 |
check out my next installation so I can see how the new file differs |
66 |
from the old one, and adapt the changes to my customized version. |
67 |
|
68 |
* All the goodies from Control Groups: You can use kernel cgroups to |
69 |
monitor/control several properties of your daemons, out of the box, |
70 |
almost no admin effort involved. |
71 |
|
72 |
* It tries to unify Linux behaviour among distros (some can argue that |
73 |
this is a bad thing): Using systemd, the same |
74 |
configurations/techniques work the same in every distribution. No more |
75 |
need to learn /etc/conf.d, /etc/sysconfig, /etc/default hacks by |
76 |
different distros. |
77 |
|
78 |
* Finally, and what I think is the most fundamental difference between |
79 |
systemd and almost any other init system: The service unit files in |
80 |
systemd are *declarative*; you tell the daemon *what* to do, not *how* |
81 |
to do it. If the service files are shell scripts (like in |
82 |
OpenRC/SysV), everything can spiral out of control really easily. And |
83 |
it usually does (again, look at sshd; and that one is actully nicely |
84 |
written, there are all kind of monsters out there abusing the power |
85 |
that shell gives you). |
86 |
|
87 |
These are the ones off the top of my head; but what I like the most |
88 |
about systemd is that it just works, and that it makes a lot of sense |
89 |
(at least to me). |
90 |
|
91 |
Most of systemd features can be implemented in OpenRC (although the |
92 |
speed difference will never be eliminated if OpenRC keeps using shell |
93 |
files). My question is: why bother? systemd is already here, it |
94 |
already works, and it's actually supported in Gentoo. |
95 |
|
96 |
But again, remember that I'm biased: I keep an overlay to run Gentoo |
97 |
systems with only systemd; no OpenRC, no baselayout, no SysV. You guys |
98 |
can try it if you want: |
99 |
|
100 |
http://xochitl.matem.unam.mx/~canek/gentoo-systemd-only/ |
101 |
|
102 |
Usual disclaimer: I take no responsibility if using my overlay results |
103 |
in your systems asploding. That said, I'm using it on all my machines |
104 |
without a hitch. |
105 |
|
106 |
Regards. |
107 |
-- |
108 |
Canek Peláez Valdés |
109 |
Posgrado en Ciencia e Ingeniería de la Computación |
110 |
Universidad Nacional Autónoma de México |