tickless cron

Rich Felker dalias at aerifal.cx
Sun Sep 24 22:38:32 UTC 2006


On Sun, Sep 24, 2006 at 11:52:02PM +0200, Denis Vlasenko wrote:
> > what i mean is not have cron set a timer to one minute and evaluating
> > all the schedules once a minute. the present crontab format works well
> > in that mode becaue its just a straight comparison with the present
> > time and the values in a crontab line which can actually be placed in
> > a 'struct time'. what i would like to have is for cron to set the
> > timer exactly to the next timeout. i have a tickless kernel and it
> > does not make sense for cron the do exactly what i just removed from
> > the kernel.
> 
> Just think what will happen if someone will set system time...

It's totally acceptable to wake up once a minute and make sure the
system time did not change drastically. It's not acceptable to run
thru the entire crontab every minute for no reason. The overall
processing time may be low, but the _spike_ in load could be
problematic. It also prevents the memory used storing the crontab
entries (or the file if the file is read every time) from getting
swapped out, which is annoying on low-memory systems.

> Periodic check every minute really isn't a load worth optimizing out.

It is for many reasons, not the least of which is that the solution
with it "optimized out" is actually smaller and simpler too!!

Rich




More information about the busybox mailing list