systemd: please stop trying to take over the world :)

Denys Vlasenko dvlasenk at
Fri Jun 10 13:07:48 UTC 2011

Hi Lennart,

systemd is eating a lot more memory than any other init process
I ever played with.

Granted, systemd does a bit more that "typical" init, but I think
using *eleven plus megabytes* of malloced space is a bit much.

systemctl --all shows 258 units total on my machine,
thus systemd uses ~40 *KILO*bytes of state per unit?

I understand your desire to replace everything by systemd.
I really do. syslogd, klogd, mount, fsck, and a dozen other things
I forget or don't know. It's called "featuritis".
Now I hear about plans to incorporate ConsoleKit into it
(hearsay, so maybe it's not true).

Look where it is now:


Mem total:2035840 anon:431208 map:78924 free:419084
 slab:91624 buf:108040 cache:942336 dirty:196 write:0
Swap total:4095996 free:4095996
 1818  624m  365m  185m 13472  155m    64   224 /usr/lib/firefox-4/firefox
 1816  433m  189m  166m 17248  142m     0   204 evolution
 1257 53672 40400 22664  6004 18336  4176   132 /usr/bin/Xorg
    1 15384 11856 13664  1340 11752     0   132 /sbin/init
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ 11.7 megs of malloc space

 1839  275m 40224 24208 10572 11020     0   132 /usr/bin/gnome-terminal
 1713  202m 45284 20308  9736  9604   576   132 /usr/libexec/xfce4/panel-plugins/xfce4-mixer-plugin
 1843  171m  9448 20264 10012  8440   344   204 xchat
 1770  152m 55672 19412 10972  6108     0   132 nautilus

It's the *fourth* largest process on my system!

# ldd `which systemd` =>  (0x00a6b000) => /lib/ (0x414f6000) => /lib/ (0x41bc1000) => /lib/ (0x0019a000) => /lib/ (0x422c9000) => /lib/ (0x420fa000) => /lib/ (0x420e6000) => /lib/ (0x420cc000) => /lib/ (0x4152f000) => /lib/ (0x00be8000) => /lib/ (0x00295000)
	/lib/ (0x00276000) => /lib/ (0x00af6000) => /lib/ (0x00f68000) => /lib/ (0x0095c000) => /lib/ (0x420c5000)

Why does systemd link against libpam?
systemd does logins now, not /bin/login or gdm or ...?

libattr? Does it mean it requires filesystem which implements
extended attributes? If not, why does it use libattr then?

libwrap? systemd is a network application now too?

libaudit? What systemd has in common with audit?

libdbus?... this is a lost battle I guess...

I propose to stop for a second and optimize systemd down
instead of trying to add even more bells and whistles to it.
Or else you'll soon end up linking against every /lib/lib*.so*

At the very least, I would like to see its memory consumption
to go down substantially.

It is an *init replacement*, not the replacement for everything.
One of init's goal is to be *simple* and *stable*.
Every new feature you add and library you link against
works against that goal.

To be honest, I doubt the wisdom of implementing service manager
as an init process. There is no inherent reason why it has to be init -
you can run it as *a child of init*, and keep init very simple.
Then, if service manager would crash, at least it doesn't
take system down with it...


More information about the devel mailing list