[arch-general] On-boot delay due to timer units
Leonid Isaev
lisaev at umail.iu.edu
Thu Apr 17 16:12:15 EDT 2014
On Thu, 17 Apr 2014 21:31:07 +0200
Thomas Bächler <thomas at archlinux.org> wrote:
> Am 17.04.2014 20:56, schrieb Leonid Isaev:
> > Hi,
> >
> > Since anacron jobs were replaced with timers, I am seeing a noticeable
> > delay before agetty prompt appears on machines which were unused for some
> > time (due to update/man-db timers starting up simultaneously).
> >
> > TLDR: Anacron inserts a random delay between boot and running the jobs, so
> > is it possible to simulate this behavior by including e.g. "OnBootSec=..."
> > in the timers at next update? Or is this option incompatible with
> > OnCalendar?
>
> OnBootSec would cause the timers to always run on boot, no matter how
> much time has passed, which is not what we want.
OK.
>
> I don't think it is a problem that the timers run on boot, but rather
> that they delay Type=idle units, like agetty. From what the
> documentation says, there should not be any delay:
>
> "Behavior of idle is very similar to simple; however, actual execution
> of the service binary is delayed until all jobs are dispatched."
>
> I am confused why get a delay here.
I think the problem is the disk I/O generated due to e.g. man-db indexing,
because I see the hdd light is solid on. So, my guess is that two things can
happen: either the login prompt is delayed, or the prompt is shown but the
actual login will stall.
>
> I think another solution in systemd would be introducing a holdoff time:
> Instead of running immediately on boot, the timer should be scheduled
> for boot+5min.
You are right -- that's the best way to put it. Except, I'd generate random
timeouts (distributed in some interval) for the corresponding services...
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://mailman.archlinux.org/pipermail/arch-general/attachments/20140417/a21aa38f/attachment.asc>
More information about the arch-general
mailing list