[systemd-devel] Reduce unit-loading time

Lennart Poettering lennart at poettering.net
Mon May 18 09:24:36 PDT 2015


On Mon, 18.05.15 18:24, cee1 (fykcee1 at gmail.com) wrote:

> 2015-05-17 17:45 GMT+08:00 Martin Pitt <martin.pitt at ubuntu.com>:
> > Hello cee,
> >
> > cee1 [2015-05-16  0:46 +0800]:
> >> Thanks for the suggestion, it was other processes running in parallel
> >> which presumably consuming lots of IO, after sending SIGSTOP at the
> >> first (and SIGCONT later), the unit loading time is decreased to
> >> ~100ms.
> >
> > You probably want to use some readahead solution. We found that it
> > makes a significant improvement on ARM boards with slow MMC cards.
> >
> > Martin
> > --
> > Martin Pitt                        | http://www.piware.de
> > Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
> 
> Hey,
> 
> Thanks for the suggestion, IIRC, sequential read is also beneficial
> for flash storage.
> 
> Does the readahead-*.service shipped with systemd work for you?

We removed the readahead logic from systemd a while back, since it had
no maintainer, and nobody wanted to pick it up.

> Question:
> How does systemd schedule two services that can be launched in
> parallel?

It's not defined. systemd will fork things of in an undefined order if
ther are multiple units runnable at the same time.

As mentioned elsewhere, I'd be willing to merge a patchat that changes
this and allows control of what service is forked off first, via some
per-unit Priority= setting or so.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list