Login
You're viewing the functional.cafe public feed.
  • benbenjamineskola@hachyderm.io
    Oct 31, 2026, 11:14 AM

    @hzulla would it actually help? Cron would still wake up at the minute mark in order to sleep again for a few more seconds.

    I suppose you’d have two smaller spikes: at the minute, and some seconds later; and the second one would be different for every machine and so average out on a global scale. The first spike would still exist, just smaller, perhaps.

    💬 4🔄 0⭐ 2

Replies

  • 💬 0🔄 0⭐ 4
  • 💬 1🔄 1⭐ 4
  • 💬 1🔄 1⭐ 1
  • 💬 0🔄 0⭐ 0
  • Oct 31, 2026, 2:04 PM

    @benjamineskola @hzulla I think that premise, "cron would wake up on the minute mark" is incorrect: you'd randomize the time it sleeps, in both positive and negative directions Compare how systemd-timers sleep; they already have a well-configurable randomization of wake times, exactly to combat loading a shared resource with a large number is simultaneously triggering machines.

    💬 2🔄 0⭐ 0
  • benbenjamineskola@hachyderm.io
    Oct 31, 2026, 2:09 PM

    @funkylab I mean, yeah, if you modified cron to do so. I was assuming that this was adding a random sleep to the start of the cron job itself, which was perhaps a misinterpretation. (I think OpenBSD cron already has this feature, but I’m not sure if it avoids the wake up or only delays the start of the task; and I haven’t seen it in other crons.)

    Although of course this might be a premature optimisation, because it hasn’t been shown that there’s a measurable amount of energy being used by cron wakeups in the first place.

    @hzulla

    💬 2🔄 0⭐ 1
  • Oct 31, 2026, 2:17 PM

    @benjamineskola @hzulla agreed. Waking up happens hundreds to thousands of times per second to a modern application processor running an OS like Linux, Windows, *BSD anyways. The extra cost of drawing a pseudorandom or even random number and going back to sleep would be negligible to impossible to measure, even at large scales.

    💬 2🔄 0⭐ 0
  • benbenjamineskola@hachyderm.io
    Oct 31, 2026, 2:22 PM

    @funkylab there is a related problem, which is when hourly/daily jobs get run all at the same minute across a large number of machines — updates for example. The issue there is either network traffic or load on the update servers though; and spreading it out doesn’t (and isn’t intended) to reduce the overall load, just to reduce the size of the spikes.

    So I guess we also have to consider whether the power spikes are an issue in themselves (if they’re even measurable), or whether we’re more concerned with overall power consumption.

    @hzulla

    💬 2🔄 0⭐ 0
  • Oct 31, 2026, 2:29 PM

    @benjamineskola @hzulla well they certainly are if whatever the machines are doing is suddenly power intense, and if the machines are a significant consumer in the synchronous grid. (Which my guess would be is something data center operators need to negotiate when getting a grid operator to connect up their DC; they need to buy cable capacity and build transformers for Max load, not just median load)
    At a residential PCs scale, wouldn't worry about it much. English tea kettles & halftime breaks.

    💬 1🔄 0⭐ 0
  • Oct 31, 2026, 8:45 PM

    @funkylab @benjamineskola @hzulla When I first started with computers we had gotten our hands on some old harddrives that were about 5 cm thick. They had some jumper settings for how many seconds to delay spinup on boot. Since they were pretty heavy the engines would draw too much power if you start two harddrives at the same time and kill the power to the computer. I think the new hdd's we bought when we had money had the same thing for a few years.

    My cron jobs are still all running a few minutes off the hour where I can thanks to this experience. Some have randomized wait times between starts.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • benbenjamineskola@hachyderm.io
    Oct 31, 2026, 6:46 PM

    @johntimaeus oh yeah, I don’t mean to say it’s a new or unsolved issue, but rather something that’s been a consideration in running scheduled jobs for a long time by now.

    @funkylab @hzulla

    💬 0🔄 0⭐ 0
  • Oct 31, 2026, 2:25 PM

    @funkylab @benjamineskola My guess it's not cron/systemd daemon waking up on specific times being the problem, but maintainers setting up larger jobs (such as backups) starting at the minute mark. Too many things globally are set to run *something* at xx:xx:00 and this seems to add up to a measurable strain on the grid, thanks to synchronized system clocks. The researchers point out that this strain is not a giant problem yet, but it can be measured globally.

    💬 1🔄 0⭐ 1
  • 💬 0🔄 0⭐ 1
  • Gabriele Sveltogabrielesvelto@mas.to
    Oct 31, 2026, 5:51 PM

    @benjamineskola @funkylab @hzulla maybe I'm off the mark here but cron implementations have always honored the RANDOM_DELAY env variable and it's always been recommended to set it to a non-zero value. IIRC systemd timers also honor it but I don't know if it's set by default or not.

    💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Nov 1, 2026, 3:21 AM

    @DamonHD

    RANDOM_DELAY is part of the POSIX standard, so I actually would be very, very surprised, if they don't.

    Cronie, anachon, and even systemd supports it.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 8:22 AM

    @shaknais Even if it were available, it seems to randomise by whole minutes, so not potentially easing the problem in this article.

    "The RANDOM_DELAY variable allows delaying job startups by random amount of minutes with upper limit specified by the variable."

    My current server cron is Vixie, which does not support this feature.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 9:53 AM

    @DamonHD

    Not following. If it randomises by minutes, that flattens the curve, over minutes, and avoids the thundering herd problem.

    How would it not?

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 9:55 AM

    @shaknais This article refers to things happening (such as CPU use) at the start of each minute. Merely picking a random minute does not make that particular problem go away. Picking a random second within each minute would. (Better still to pick a random very-fine-grained sub-mains-cycle time to avoid creating a new start-of-second surge problem.)

    💬 1🔄 0⭐ 1
  • Nov 1, 2026, 9:59 AM

    @DamonHD Unless everyone picked the same minute, by not seeding their random, you'd be correct.

    But, everyone has a different minute. And each task has a different minute.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:02 AM

    @shaknais The problem is that the first few seconds of an average minute have a higher load (see the charts in the Nature paper). Spreading across random minutes helps at other levels, but does not eliminate this feature. When looking at the 1/60Hz spectrum, and eg worrying about mechanical wear on physical turbines, it does not matter much in *which* minutes those early-second surges happen, just that they do happen.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:10 AM

    @DamonHD Okay... It doesn't matter which minute, so long as that minute is commonly chosen by _everyone_.

    Otherwise you could say it spreading across hours wouldn't flatten the curve - a logical fallacy.

    Because of jitter, not everyone is choosing the same moment. Which means there is a lesser load, and a more distributed load, that gracefully increases, and decreases.

    If you spread across the 5m interval, it would disappear into the graphs noise.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:14 AM

    @shaknais Synchronised extra work in the start of ANY minute, as fired off by EVERY cron on the planet, will add to *this* problem. Cron (as I have ever used) does not add jitter to its wakeup on the minute, whichever minute that is. (Picking random minutes does reduce *other* problems.)

    To be clear: 1/60Hz spikes are independent of 1/3600Hz spikes etc: they should both be dealt with, but have to dealt with separately.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:22 AM

    @DamonHD How would spreading the start time of processes, across 60 new units, instead of 1, suddenly increase load?

    How do you get _more_ from _less_? You're distributing.

    If what you're saying is true, then PFR wouldn't be working in Australia, because that only spreads across 4-seconds for the 1/50Hz. But it is working.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:27 AM

    @shaknais Independent frequency components are independent. I don't know how to say this in other ways.

    Spreading the start time from the start of minute 0 to the start of minute X where X is randomly 0, 1, 2, ... 59 (in each case a whole number) still results in average extra load across the hour of the same amount in the start of an average minute.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:28 AM

    @DamonHD Okay... So what the article says Australia is doing and working for dealing with the problem, isn't dealing with the problem. Got it.

    💬 1🔄 0⭐ 0
  • Nov 1, 2026, 10:30 AM

    @shaknais They are containing the problem by making the rest of the system work harder to suppress it, but not removing it at source.

    Did you look at the linked to Nature paper? It's moderately readable, and explains this better than I am.

    "These developments demonstrate that the recurrent 1-min oscillation already has operational relevance, even though current mitigation strategies primarily address amplification rather than the underlying source."

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 2, 2026, 8:59 PM

    @funkylab @benjamineskola @hzulla I have used the trick to convert the mac address of a server to a decimal integer, and use (a modulo) of that as a stable, but random across servers, delay to spread out cronjobs in a fleet

    💬 0🔄 0⭐ 0
  • Oct 31, 2026, 6:50 PM

    @benjamineskola @hzulla depends. Is cron checking the time the power spike or the actual job itself? I'd expect the on-the-minute bump of cron setting a random delay to be small compared to all the busy work smeared across the rest of the minute.

    💬 0🔄 0⭐ 0