[systemd-devel] systemd-readahead and often used applications

Kok, Auke-jan H auke-jan.h.kok at intel.com
Sun Apr 14 12:18:41 PDT 2013


On Sun, Apr 14, 2013 at 12:05 PM, Reindl Harald <h.reindl at thelounge.net> wrote:
> Am 14.04.2013 20:49, schrieb Kok:
>>> a reason i would love to define specific applications which should
>>> always get preloaded on boot independent what is collected at runtime
>>> what about starting the machine remove vis WOL and never login because
>>> some data sync and shutdown 2 hours later - will the desktop get lost
>>> from the readahead-collection - questions over questions...
>>
>> feel free to contribute code or algorithm's to improve, I'll be more
>> than welcome to take concrete contributions as I've been trying to
>> improve on readahead for several years now. There is certainly room
>> for improvement, but the devil is in the details
>
> if i only could C/C++ additionally to PHP/SQL and had time to
> work that out by 3 fulltime-jobs for one man :-(
>
> playing around with "/usr/lib/systemd/systemd-readahead collect"
> it looks like it re-creates /.readahead from scratch, meaning
> you lose also anything covered from the boot-run
>
> what about a dbus-triggered instance like cups and other services
> are fired up after login which creates a /.readahead-usersession
> proceeded at boot the same way as /.readahead

it does more damage to do excessive readahead at boot for services
that don't need to start until way, way after boot. The whole idea is
to only read things you are going to need, and not more. Otherwise you
could just read everything you can possibly read from disk into
memory.

>>> seems like i covered a bug
>>> the collector stops after exactly 2 minutes
>>
>> src/readahead/readahead.c has:
>>
>> usec_t arg_timeout = 2*USEC_PER_MINUTE;
>>
>> so, it's by design to stop after 2 minutes.
>>
>> That's for a good reason, I'm not sure if changing it makes much sense
>> - most people will never want to use non-standard values, and 2
>> minutes helps everyone (it could help some non-standard cases more,
>> but it doesn't hurt anyone)
>
> well, but that makes "systemd-readahead-done.timer" useless as also
> extend how long the collector should run

most people won't ever need to have it run more than 10 seconds until
after the system is done booting, so it has good value. Longer isn't
better (see my earlier argument, which holds especially true for
rotating media).

Auke


More information about the systemd-devel mailing list