shift cron.daily / logrorate timer

Bug #2028130 reported by Junien Fridrick
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Mirror Charm
New
Undecided
Unassigned

Bug Description

The archive servers see connections spikes with the following patterns :
- every hour, at :00 ("hourly" systemd timer, "0 X * * *" cron jobs) and :17 (cron.hourly)
- every day at 00:00 ("daily" systemd timer, which adds to the "hourly" timer)
- every day at 06:25 (cron.daily)

And generally, traffic is higher during EMEA and AMER day, and lower during APAC day.

We should try to make the archive servers as idle as possible during high usage hours, I would suggest updating logrotate.timer and cron.daily (in /etc/crontab) to start at 04:30 UTC.

Thanks

Revision history for this message
Tom Haddon (mthaddon) wrote :

logrotate.timer is:

```
$ sudo systemctl cat logrotate.timer
# /lib/systemd/system/logrotate.timer
[Unit]
Description=Daily rotation of log files
Documentation=man:logrotate(8) man:logrotate.conf(5)

[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true

[Install]
WantedBy=timers.target
```

This should be amended via systemd override.

Revision history for this message
Junien Fridrick (axino) wrote :

logrotate.timer has AccuracySec=1h, but I'm seeing it always happen really near 00:00, which if I'm

ubuntu@prod-archive-servers-1:~$ journalctl -b -u logrotate.service|grep Starting
Jul 12 00:00:13 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 13 00:00:18 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 14 00:00:24 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 15 00:00:03 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 16 00:00:01 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 17 00:00:08 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 18 00:00:01 prod-archive-servers-1 systemd[1]: Starting Rotate log files...
Jul 19 00:00:01 prod-archive-servers-1 systemd[1]: Starting Rotate log files...

ubuntu@prod-archive-servers-2:~$ journalctl -b -u logrotate.service|grep Starting
Jul 12 00:00:03 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 13 00:00:03 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 14 00:00:03 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 15 00:00:01 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 16 00:00:01 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 17 00:00:03 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 18 00:00:01 prod-archive-servers-2 systemd[1]: Starting Rotate log files...
Jul 19 00:00:01 prod-archive-servers-2 systemd[1]: Starting Rotate log files...

ubuntu@prod-archive-servers-3:~$ journalctl -b -u logrotate.service|grep Starting
Jul 12 00:00:06 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 13 00:00:13 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 14 00:00:07 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 15 00:00:02 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 16 00:00:01 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 17 00:00:00 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 18 00:00:08 prod-archive-servers-3 systemd[1]: Starting Rotate log files...
Jul 19 00:00:09 prod-archive-servers-3 systemd[1]: Starting Rotate log files...

Revision history for this message
Junien Fridrick (axino) wrote :

The following cowboy has been installed on the production archive servers running jammy :

$ cat /etc/systemd/system/logrotate.timer.d/override.conf
[Timer]
OnCalendar=
OnCalendar=*-*-* 04:30:00
AccuracySec=1min

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.