Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

disk size based retention #124

Closed
gouthamve opened this issue Aug 20, 2017 · 6 comments · Fixed by #343
Closed

disk size based retention #124

gouthamve opened this issue Aug 20, 2017 · 6 comments · Fixed by #343

Comments

@gouthamve
Copy link
Collaborator

With talk about 2.0 defaulting to +Inf retention time, there is also talk about adding a flag which does retention based on the data size on disk. Do we want to support that?

If yes, a simple hacky approach would be to check the size of a block after persisting and then updating meta.json with that info. On startup and reload, update the metric. But one obvious problem with that is the WAL size.

@fabxc
Copy link
Contributor

fabxc commented Aug 20, 2017 via email

@SuperQ
Copy link
Contributor

SuperQ commented Aug 20, 2017

Yes, having a disk-size retention would be very valuable, and possibly more useful than a time-based setup for many installation methods.

From the "SRE Hat" perspective. Having systems automatically behave rather than have to rely on alerting and operator action is highly desired.

Supporting both time and byte retention flags is very much desired.

@fabxc
Copy link
Contributor

fabxc commented Aug 20, 2017 via email

@RichiH
Copy link
Member

RichiH commented Aug 20, 2017

There's really no graceful degradation either way. You can choose between a crash loop without ingesting new data and old losing data; both are near pathological.

Especially in testing scenarios and for aggressive federation, a cap on size rather than time seems to make sense. If both are set, whichever is lower should hit.

Also, we talked about exposing the local storage size and currently oldest time series as a metric.

@SuperQ
Copy link
Contributor

SuperQ commented Aug 21, 2017

Just deleting old data without explicit consent is not graceful degradation.

Having a flag for retention-in-bytes is explicit consent for doing exactly this.

@zhanglijingisme
Copy link

Is there any possibility to get approximate date for this feature?
It could be a great help if we can know when & in which Prometheus version this could be available.
Sincerelly thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants