man/systemd.timer: Correct inaccuracy in man page

The docs previously stated that RandomizedDelaySec is applied onto the
next scheduled time, but after 9fa326b18a
this is no longer the case.

I also reworded FixedRandomDelay= slightly, to make it a bit clearer
This commit is contained in:
Adrian Vovk
2025-02-18 16:06:48 -05:00
parent 18f2d38d5f
commit fca20a1be6
+9 -9
View File
@@ -266,9 +266,9 @@
<listitem><para>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 before each iteration, and the delay will simply
be added on top of the next determined elapsing time, unless modified with
<varname>FixedRandomDelay=</varname>, see below.</para>
Each timer unit will determine this delay randomly before each iteration, unless modified with
<varname>FixedRandomDelay=</varname>, see below. The delay is added on top of the next determined
elapsing time or the service manager's startup time, whichever is later.</para>
<para>This setting is useful to stretch dispatching of similarly configured timer events over a
certain time interval, to prevent them from firing all at the same time, possibly resulting in
@@ -292,12 +292,12 @@
<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
<option>false</option>.</para>