If this is yours, I recommend adopting some sort of inverse relationship between file size and retention time. 0x0 does this and I think it makes a lot of sense: https://0x0.st/
retention = min_age + (-max_age + min_age) * pow((file_size / max_size - 1), 3)
days
365 | \
| \
| \
| \
| \
| \
| ..
| \
197.5 | ----------..-------------------------------------------
| ..
| \
| ..
| ...
| ..
| ...
| ....
| ......
30 | ....................
0 256 512
MiB