[systemd-devel] Improve boot-time of systemd

Lennart Poettering lennart at poettering.net
Tue Apr 19 17:36:09 PDT 2011


On Fri, 18.03.11 09:35, fykcee1 at gmail.com (fykcee1 at gmail.com) wrote:

> Hi all,
> 
> We did a series boot-time tests of systemd, and found some interesting things:
> (Note the tests were performed on a laptop with a 4-core mips cpu, AMD
> RS780 chipset, 2GB Memory, rotate harddisk with ext4 filesystem,
> debian squeeze, Linux 2.6.36 with fanotify enabled, systemd-v20, only
> boot to console.)
> 
> 1. What can readahead affect boot-time?
> Sadly observed negative affect -- boot-time increases at least 1s.
> With bootchart, I find more I/O at boot compared with no readahead,
> see attachment noreadahead-vs-readahead.png.
> Thoughts: Maybe we need only monitor files with read access, not all
> opend files? P.S. inotify seems enough for the job (with one more step
> to open each file).

In general if what you boot is minimal the effect of readahead will be
minimal too, but the cost of spawning yet another service is what you
pay for.

> 2. udev-settle.service serializes the boot process, see attachment
> udev-settle.png.
> I tried to create a hotplug.target(which is activated after
> default.target), and made udev-settle reside at it, this rendered a
> unbootable system. systemd depends on udev at early time.

udev-settle is unnecessary, unless you use LVM and very few other broken
services. As soon as they are fixed we can remove this for good. I don't
use this service on my machine anymore.

Also see my more recent blog story about this:

http://0pointer.de/blog/projects/blame-game

> BTW, bootchart seems not very intuitive(no service, only processes.
> Also some processes may be missed if they live between two "ps aux"
> call of bootchart), is it possible to add similar feature to systemd?

We have that now with systemd-analyze plot.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list