[systemd-devel] Optimizing systemd binaries for small deployments

Tino Breddin tbreddin at tpip.net
Wed Mar 27 06:49:43 PDT 2013

I figured the next step would be to dive in and remove duplicate or unneeded functionality.

I couldn't find information about a shared library approach yet, which should naturally be 
a great improvement. Guess I should check the ML archives a little more.

----- Original Message -----
From: "Zbigniew Jędrzejewski-Szmek" <zbyszek at in.waw.pl>
To: "Tino Breddin" <tbreddin at tpip.net>
Cc: systemd-devel at lists.freedesktop.org
Sent: Wednesday, March 27, 2013 2:09:05 PM
Subject: Re: [systemd-devel] Optimizing systemd binaries for small deployments

On Wed, Mar 27, 2013 at 11:49:44AM +0100, Tino Breddin wrote:
> Hi there,
> We are in the process of creating a very small image for devices with a maximum of 4MB flash. Compared to a SysV variant which clocks in at ~1MB using Systemd 
> we are currently getting images sizes of ~10MB. At first glance the systemd binaries seem quite large. Before diving into lots of optimization I wanted to ask
> whether anybody has pointers we should follow or even experience using systemd for bare minimum images.

I'm assuming that you're compiling without -g and such. Please
remember that systemd stuff replaces quite a few other binaries,
rather than just /sbin/init, so you should compare that against
the sum of replaced things.

One thing you could try, is the shared library approach. Currently
we use a static convinience library, but it could be changed to 
a shared libsystemd-private.so, and more code would be shared.
There was a thread a while back.


More information about the systemd-devel mailing list