Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstorage.tsdb.retention.size not being respected >15d #5213
Comments
This comment has been minimized.
This comment has been minimized.
|
Ah, you need to set And, thanks for this super clear bug report! |
This comment has been minimized.
This comment has been minimized.
|
oooooooooooooh I see. So to be clear, I should set the retention time to some amount, but if I were going to use more storage than the retention size, it would respect the retention size rather than retention time. But I'd imagine retention time still informs the size of the blocks, so I should endeavor to set that somewhat correctly? |
This comment has been minimized.
This comment has been minimized.
|
Yes, we check both size and time and if we cross either, we start deleting data. We have limits on the block sizes now. It should be safe to set retention to 100years :) |
This comment has been minimized.
This comment has been minimized.
|
awesome, I probably will do that, some of these servers when I did the query above were looking at ~15 days others like 10 years, not sure how that will actually work in practice but I'm excited to try :) |
krasi-georgiev
added
the
component/local storage
label
Feb 14, 2019
krasi-georgiev
referenced this issue
Feb 14, 2019
Merged
use the default time retention value only when no size retention is set #5216
This comment has been minimized.
This comment has been minimized.
|
@TimSimmons just submitted a PR that removes the confusion and the default time retention will be used only when both (time/size) flags are not set. |
TimSimmons commentedFeb 13, 2019
•
edited
What did you do?
Started an existing Prometheus instance (previously with 15d retention on v2.3.1 with
--storage.tsdb.retention.time=15d) on v2.7.1 with--storage.tsdb.retention.size 473436089549BWhat did you expect to see?
Retention slowly creep upwards until it used that many bytes of disk.
What did you see instead? Under which circumstances?
Retention inched up past 15d and then went back down. Never exceeding 16 days.
Environment
System information:
Linux 4.4.0-112-generic x86_64Prometheus version:
Prometheus configuration file:
Logs:
Nothing out of the ordinary
Other Information:
Only thing that seemed odd to me is that the other retention parameters in the flags page still showed 15d in the page, so maybe that was still happening. Or maybe upgrading from 2.3.1 made it bad somehow?
Anything else?
Thank you for taking the time to read my bug report, any time you spend on this is greatly appreciated. Open source maintainership is hard and you all are doing a great job👍