Thanks to everyone sharing information. Basically that’s what I expected, too, except this: I run about 10 instances of the timer, and all 10 instances are started at the same second. My initial expectation wad that systemd might spread the instances in the 6 hour windows somehow. Maybe starting the next instance once the previous instance had finished. I’m somewhat unsure about the energy saving: Will 10 jobs run simultaneously consume less power than the 10 jobs run sequentially? My guess is that the timer overhead may be negligible. Regards, Ulrich From: Adrian Vovk <adrianvovk@xxxxxxxxx> I don't have the initial email for some reason (got caught in spam filter? Idk) so I don't have the full context. On Mon, Aug 19, 2024, 03:55 Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:
When your timer is scheduled for 00:00 but accuracy is 6h, then systemd will try to fire the timer at 00:00 but is allowed to be up to 6 hours "late" to save power. So the timer will fire at any time between 00:00 and 06:00. Let's say you have another timer set to fire at 01:00 + 6hr accuracy. systemd will likely fire both timers at around 01:00. The first timer is allowed to start anywhere between 00:00 and 06:00 and the second between 01:00 and 07:00. These
ranges intersect from 01:00 to 06:00, so systemd will fire both timers at some point in that range. It's free to pick exactly when and I'm not looking at the code, but I wouldn't be surprised if it'll pick a time closer to 01:00 to minimize the amount of time
it's "late". |