]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/timer: Introduce RandomOffsetSec= knob (#36437)
authorLennart Poettering <lennart@poettering.net>
Tue, 17 Jun 2025 14:05:12 +0000 (16:05 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Jun 2025 14:05:12 +0000 (16:05 +0200)
This is like RandomDelaySec, but it doesn't reset whenever the manager
restarts.

Fixes https://github.com/systemd/systemd/issues/21166

1  2 
man/org.freedesktop.systemd1.xml
man/systemd.timer.xml
src/core/dbus-timer.c
src/core/load-fragment-gperf.gperf.in
src/core/timer.c
src/core/timer.h

Simple merge
index 03a4bda35968af4b8af7f2f1cc233db356d2179f,cf5d1030a6f503e6af753ae650571e372b76d6fb..5f1dd0ce9c9bf36498c6c8b065b3aea54a1b5ae2
        <varlistentry>
          <term><varname>FixedRandomDelay=</varname></term>
  
-         <listitem><para>Takes a boolean argument. When enabled, the randomized offset specified by
-         <varname>RandomizedDelaySec=</varname> is reused for all firings of the same timer. For a given timer
-         unit, the offset depends on the machine ID, user identifier and timer name, which means that it is
-         stable between restarts of the manager. This effectively creates a fixed offset for an individual
-         timer, reducing the jitter in firings of this timer, while still avoiding firing at the same time as
-         other similarly configured timers.</para>
+         <listitem><para>Takes a boolean argument. When enabled, the randomized delay specified by
+         <varname>RandomizedDelaySec=</varname> is chosen deterministically, and remains stable between all
+         firings of the same timer, even if the manager is restarted. The delay is derived from the machine
+         ID, the manager's user identifier, and the timer unit's name. This effectively creates a unique fixed
+         offset for each timer, reducing the jitter in firings of an individual timer while still avoiding
+         firing at the same time as other similarly configured timers.</para>
  
 -        <para>This setting has no effect if <varname>RandomizedDelaySec=</varname> is set to 0. Defaults to
 +        <para>This setting has an effect only if <varname>RandomizedDelaySec=</varname> is not 0. Defaults to
          <option>false</option>.</para>
  
          <xi:include href="version-info.xml" xpointer="v247"/></listitem>
Simple merge
Simple merge
Simple merge
Simple merge