[systemd-devel] Reduce unit-loading time

Martin Pitt martin.pitt at ubuntu.com
Tue May 19 10:01:53 PDT 2015


Hey cee1,

cee1 [2015-05-18 23:52 +0800]:
> At the first glance, I find ureadahead has some difference compared
> with the readahead once in systemd, IIRC:

Yes, for sure. systemd's was improved quite a bit. ureadahead is
mostly unmaintained, but it works well enough so we didn't bother to
put work into it until someone actually complains :-)

> 1. ureadahead.service is in default.target, which means ureadahead
> starts later than systemd's?

That mostly means that it's not started with e. g. emergency or
rescue. It still starts early (DefaultDependencies=false).

> 2. The original systemd readahead has "collect" and "replay" two
> services, and these are done in ureadahead.service?

Yes.

> 3. IIRC, The original systemd readahead uses madvise(); ureadahead
> uses readahead()
> 4. The original systemd readahead uses fanotify() to get the list of
> accessed files; ureadahead use fsnotify

I haven't verified these, but this sounds correct. ureadahead is
really old, presumably the newer features like fanotify weren't
available back then.

> 5. ureadahead has different readahead strategies for ssd and hhd:

Right. These were created by some rather wide-scale measurements back
then.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list