Skip to content

Stretch systemd timer over one hour#574

Merged
cgzones merged 1 commit intologrotate:mainfrom
cgzones:timer_window
Mar 15, 2024
Merged

Stretch systemd timer over one hour#574
cgzones merged 1 commit intologrotate:mainfrom
cgzones:timer_window

Conversation

@cgzones
Copy link
Member

@cgzones cgzones commented Jan 5, 2024

The initial introduction of the systemd timer in commit 05228c2 ("Add logrotate service and timer for systemd") included the directive AccuracySec=12h. AccuracySec= is not a load distribution option but a power saving one, see systemd-timer(5). In commit 3f3991e ("Timer unit: change trigger fuzz from 12h to 1h") the value was reduced to 1h, while the discussion in #230 also mentioned load distribution.

Use RandomizedDelaySec= instead of AccuracySec= to actually spread the start time of the service, and ignore potential system wakeups below the rate of the default of AccuracySec= of one minute.

Fixes: #567

The initial introduction of the systemd timer in commit 05228c2 ("Add
logrotate service and timer for systemd") included the directive
`AccuracySec=12h`.  AccuracySec= is not a load distribution option but a
power saving one, see systemd-timer(5).  In commit 3f3991e ("Timer
unit: change trigger fuzz from 12h to 1h") the value was reduced to 1h,
while the discussion in logrotate#230 also mentioned load distribution.

Use RandomizedDelaySec= instead of AccuracySec= to actually spread the
start time of the service, and ignore potential system wakeups below the
rate of the default of AccuracySec= of one minute.

Fixes: logrotate#567
Copy link
Member

@jamacku jamacku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgzones cgzones mentioned this pull request Jan 5, 2024
8 tasks
@cgzones cgzones merged commit b989dc0 into logrotate:main Mar 15, 2024
@cgzones cgzones deleted the timer_window branch March 15, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

systemd timer fuzz not implemented as intended

2 participants