Default schedule for maintaince seem too agressive?

I run my backups every 12 hours.
However, it seems like “Periodic maintenance” is run every hour.
It seems like it’s redundant and wasteful to run maintenance so often, don’t you think? Nothing changed in my repositories between those 12 hours.
With local backups that’s just wasted resources, but with online backups like B2 or S3 it actually costs money in API requests.

Shouldn’t maintenance jobs schedule automatically be adjusted in proportion to the actual backup jobs?

Hello, I think that you could set interval with maintenance set command.

Yes, it can be manually adjusted, but I’m talking about sane defaults…

But even if manually adjusting that schedule, the documentation doesn’t instructs on the recommended intervals. How often should it be run? Once between each backup? Twice? Once every 10 backups? Etc.

2 Likes

Did you ever figure out an answer to this? Asking myself exactly the same question…

Nobody else replied so I don’t know :frowning:

As a rule of thumb run quick maintenance as often as you run your backups (so daily for once a day backup). But it is very quick so for most people does not make any sense to tinker with default schedule.

Full maintenance - every 24h is really good default assuming you run some backups. If you run backup only once a week than schedule it similarly. Please take a note that in case of forgetting snapshots real repo data will be removed only after multiple full maintenance cycles. It also means that if you schedule it to run very rarely (relative to your backup frequency) it can become real hog - as then a lot things can accumulate that have to be taken care of.

Periodic maintenance takes literally a 1 second (over 300Tb backups), full - 2 hours. So i don’t think it worth to change anything.

It doesn’t make sense to you because in your setup it’s fast.
But it’s not just about the speed.
For different people with different hardware, different backends, different data pattern it can take longer, and worse still, needlessly cost them money.

If it’s that quick and recommended to run it as often as backup jobs themselves, why have it run separately rather than automatically at the end of each backup job?
That way you simplify things by only having full maintenance as a separate thing.