Elektrine lite

← Feed

@david_chisnall@infosec.exchange

2026-11-01 10:14 UTC

@hzulla@infosec.exchange I learned about cron jobs about 25 years ago. I was told then that it’s good to add a random number of minutes to nightly cron jobs to avoid thundering herds problems. Some tools have this built in: freebsd-update cron, for example, sleeps a random number of seconds up to an hour to avoid every machine that uses it hammering the server at the same time. I’m not sure when this stopped being taught. The impact on the electricity grid is a specific case of the same general problem. The thing that surprises me is that @daily is specified to run at an exact time. I had assumed it introduced some jitter to avoid these problems. EDIT: I misremembered the layer of the system responsible for this. On FreeBSD, the main use of @daily is to run periodic daily. This then schedules the periodic tasks, in dependency order. This has a anticongestion_sleeptime setting and will sleep a random amount up to that amount. The default is 3600, so the daily tasks will start at a random time between midnight and 1am.

Replies (0)

No replies.