Victoriametrics: Add ability to set small retention periods (starting from a day)

Created on 1 Apr 2019  路  4Comments  路  Source: VictoriaMetrics/VictoriaMetrics

The issue

The minimum possible retention in VictoriaMetrics is 1 month. Sometimes users want smaller retention periods starting from a day in order to reduce costs on storage.

Solution

Add ability to set small retention periods starting from a day.

enhancement

Most helpful comment

FYI, the following commits add support for -retentionPeriod smaller than one month:

  • for single-node VictoriaMetrics - 5bfd4e62188f74606b463aab3135beb17a8456c8
  • for cluster VictoriaMetrics - 0db7c2b500940d278c7c71bb7b0dd6ec9b097b33

These commits allow to set:

  • fractional -retentionPeriod, i.e. -retentionPeriod=0.5 sets retention to a half of month
  • -retentionPeriod with suffixes such as d (days), w (weeks) or y (years). For example, -retentionPeriod=5d would set retention period to 5 days.

See more details about retention in the docs.

These commits can be tested right now by building VictoriaMetrics from sources according to the following docs:

All 4 comments

just running out of disk and come to this issue...
we calculate the disk requirement by 1 month, but in fact it require at least two month
which is around 10Tb in our setup

keep data by day would be really helpful

Having a smaller retention policy would also be beneficial for use case in using VictoriaMetrics.

@valyala is there any chance this is going to be addressed in the near future?

FYI, the following commits add support for -retentionPeriod smaller than one month:

  • for single-node VictoriaMetrics - 5bfd4e62188f74606b463aab3135beb17a8456c8
  • for cluster VictoriaMetrics - 0db7c2b500940d278c7c71bb7b0dd6ec9b097b33

These commits allow to set:

  • fractional -retentionPeriod, i.e. -retentionPeriod=0.5 sets retention to a half of month
  • -retentionPeriod with suffixes such as d (days), w (weeks) or y (years). For example, -retentionPeriod=5d would set retention period to 5 days.

See more details about retention in the docs.

These commits can be tested right now by building VictoriaMetrics from sources according to the following docs:

VictoriaMetrics supports -retentionPeriod smaller than 1 month starting from v1.45.0. Closing the feature request as done.

Was this page helpful?
0 / 5 - 0 ratings