Public bug reported:

The AccuracySec property in systemd is used to aggregate timer events
close together to produce less wake-ups of the system. What was added in
systemd is the RandomizedDelaySec property, which should be used
instead.

This is about the /lib/systemd/system-generators/systemd-crontab-
generator script.

Below see the extract of the man page.


       AccuracySec=
           Specify the accuracy the timer shall elapse with.
           Defaults to 1min. The timer is scheduled to elapse
           within a time window starting with the time specified
           in OnCalendar=, OnActiveSec=, OnBootSec=,
           OnStartupSec=, OnUnitActiveSec= or OnUnitInactiveSec=
           and ending the time configured with AccuracySec=
           later. Within this time window, the expiry time will
           be placed at a host-specific, randomized, but stable
           position that is synchronized between all local timer
           units. This is done in order to optimize power
           consumption to suppress unnecessary CPU wake-ups. To
           get best accuracy, set this option to 1us. Note that
           the timer is still subject to the timer slack
           configured via systemd-system.conf(5)'s
           TimerSlackNSec= setting. See prctl(2) for details. To
           optimize power consumption, make sure to set this
           value as high as possible and as low as necessary.

       RandomizedDelaySec=
           Delay the timer by a randomly selected, evenly
           distributed amount of time between 0 and the specified
           time value. Defaults to 0, indicating that no
           randomized delay shall be applied. Each timer unit
           will determine this delay randomly each time it is
           started, and the delay will simply be added on top of
           the next determined elapsing time. This is useful to
           stretch dispatching of similarly configured timer
           events over a certain amount time, to avoid that they
           all fire at the same time, possibly resulting in
           resource congestion. Note the relation to AccuracySec=
           above: the latter allows the service manager to
           coalesce timer events within a specified time range in
           order to minimize wakeups, the former does the
           opposite: it stretches timer events over a time range,
           to make it unlikely that they fire simultaneously. If
           RandomizedDelaySec= and AccuracySec= are used in
           conjunction, first the randomized delay is added, and
           then the result is possibly further shifted to
           coalesce it with other timer events happening on the
           system. As mentioned above AccuracySec= defaults to
           1min and RandomizedDelaySec= to 0, thus encouraging
           coalescing of timer events. In order to optimally
           stretch timer events over a certain range of time,
           make sure to set RandomizedDelaySec= to a higher
           value, and AccuracySec=1us.

** Affects: systemd-cron (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1586626

Title:
  RANDOM_DELAY in crontab maps to wrong property AccuracySec instead of
  the correct RandomizedDelaySec

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd-cron/+bug/1586626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to