[systemd-devel] Persistent timers delay Type=idle units

Leonid Isaev lisaev at umail.iu.edu
Tue Apr 22 10:13:34 PDT 2014


Hi,

	I'll try to answer all questions at once... 

On Tue, 22 Apr 2014 09:37:29 +0200
Thomas Bächler <thomas at archlinux.org> wrote:

> Am 22.04.2014 07:07, schrieb Lennart Poettering:
> > Humm? What precisely do you mean by "delays bootup"? Just scheduling a
> > timer unit should have about zero effect on boot times... If it does
> > this would be a bug.

This is right for the "usual", e.g. OnBootSec= timers.

Just to give a little background, archlinux has recently replaced daily cron
jobs (like indexing of man and locate databases) with OnCalendar= timers:
https://mailman.archlinux.org/pipermail/arch-dev-public/2014-March/026044.html .

> 
> From the description that I linked in the first post, it seems that the
> unit it started as soon as the timer is started. I don't know if "delay
> bootup" is the right expression, but the Type=idle units, like getty,
> don't start until the timer's unit finished starting up.

Right. I see no delay between scheduling an OnCalendar= timer and starting the
corresponding service. This wouldn't be a problem in general, but if
the /var/lib/systemd/stamp-... file is old enough, the timer and service are
launched at boot. However, the latter usually takes some time to start.

Ideally, one would like to specify the above delay in the .timer file,
because services started by the OnCalendar timers are sometimes maintainance
jobs and not always needed for booting the system.

> 
> > What does "systemctl list-jobs" print when this happens? (i.e. when the
> > bootup is supposedly delayed?)

I'll have to test this, but I'll speculate that list-jobs will show nothing
by the time I login, because it takes about 30 sec for me to enter login
credentials... 

Thanks,
L.

-- 
Leonid Isaev
GPG fingerprints: DA92 034D B4A8 EC51 7EA6  20DF 9291 EE8A 043C B8C4
                  C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140422/88804f9f/attachment.sig>


More information about the systemd-devel mailing list