[systemd-devel] Reduce unit-loading time

cee1 fykcee1 at gmail.com
Mon May 18 08:52:31 PDT 2015

Hi Martin,

At the first glance, I find ureadahead has some difference compared
with the readahead once in systemd, IIRC:

1. ureadahead.service is in default.target, which means ureadahead
starts later than systemd's?
2. The original systemd readahead has "collect" and "replay" two
services, and these are done in ureadahead.service?
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
5. ureadahead has different readahead strategies for ssd and hhd:
5.1 For the former, initiate multi-threads to perform readahead, and
they are running at the lowest IO priority.
5.2 For the later, perform readahead for both inode and file content
at a very high CPU/IO priority (and only support extN filesystem ?)

2015-05-18 18:40 GMT+08:00 Martin Pitt <martin.pitt at ubuntu.com>:
> Hello cee1,
> cee1 [2015-05-18 18:24 +0800]:
>> Does the readahead-*.service shipped with systemd work for you?
> systemd dropped the builtin readahead in 217. It's reasonably easy to
> get back by reverting the "drop readahead" patches, but carrying that
> patch in packages is fairly intrusive. In Ubuntu we've had
> "ureadahead" [1] for many years which is "good enough" for things like
> phones or other ARM boards with slow MMC storage, so I just added
> systemd units to that. It's a separate project so that we don't need
> to install ureadahead everywhere, just where/when we actually need it.
> Martin
> [1] https://launchpad.net/ubuntu/+source/ureadahead
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


- cee1

More information about the systemd-devel mailing list