Bug 82084 - RFE: Allow for random startup delay (or even spread) in timer units
Summary: RFE: Allow for random startup delay (or even spread) in timer units
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium enhancement
Assignee: systemd-bugs
QA Contact: systemd-bugs
Depends on:
Reported: 2014-08-03 09:23 UTC by freedesk.apriori
Modified: 2016-02-03 12:22 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Description freedesk.apriori 2014-08-03 09:23:55 UTC
It would be useful if timer units could be delayed randomly within, or spread out evenly across, a given interval starting at the time specified in the OnCalendar/etc. setting. This would help to spread out I/O intensive jobs and avoid disk thrashing.

In some discussions, the AccuracySec setting has been suggested as the equivalent to cron’s random delay feature, but as the man page says, the AccuracySec delay is synchronized across all timers, so that jobs will still launch in parallel.
Comment 1 Alexandre Detiste 2014-11-13 15:45:31 UTC
systemd could compute a random factor using the host + job ID as a seed 
for AccuracySec or for something new ("AccuracySec2" ? I have no idea)
Comment 2 Pierre Ozoux 2015-04-30 11:25:17 UTC
Any news on that?

Does anybody has workaround?

Comment 3 Marc Haber 2015-05-01 11:30:54 UTC
This would indeed be useful as it would eliminate the need for the usual sleep $RANDOM semantics that is used in load-generating cron jobs.

If a lot of VMs start running their cron jobs in parallel, this generates a painful load spike on the VM host that could be mitigated by adding some randomness. Please consider implementing this.

Comment 4 Lennart Poettering 2016-02-01 18:02:26 UTC
This has been implemented a while back with RandomDelaySec=
Comment 5 James Robinson 2016-02-02 23:48:19 UTC
(In reply to Lennart Poettering from comment #4)
> This has been implemented a while back with RandomDelaySec=

I may have misunderstood something here but...

This was originally submitted as RandomDelaySec= (2015-11-19):

however, it was then renamed to RandomizedDelaySec= (2015-11-27):

The online man page for systemd.timer currently uses RandomSec= (2016-02-02):

however, the 'random' feature narrowly missed the 228 release (2015-11-18) so it's not in the current versions man page.

Any help in clearing this up would be greatly appreciated, it would be great to get ahead of 229!
Comment 6 Lennart Poettering 2016-02-03 12:22:55 UTC
It got renamed in git:


The final name is RandomizedDelaySec=.

Sorry for the confusion.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.