diff --git a/README.md b/README.md index eb15671fc..dff27fe66 100644 --- a/README.md +++ b/README.md @@ -1578,19 +1578,22 @@ See also [how to work with snapshots](#how-to-work-with-snapshots). ## Retention -Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. The default retention period is one month. The minimum retention period is 24h or 1d. +Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit +character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. +For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. +The default retention period is one month. The **minimum retention** period is 24h or 1d. Data is split in per-month partitions inside `<-storageDataPath>/data/{small,big}` folders. -Data partitions outside the configured retention are deleted on the first day of the new month. -Each partition consists of one or more data parts. Data parts outside the configured retention are eventually deleted during -[background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +**Data partitions** outside the configured retention are deleted **on the first day of the new month**. +Each partition consists of one or more **data parts**. Data parts outside the configured retention +are **eventually deleted** during [background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +The time range covered by data part is **not limited by retention period unit**. One data part can cover hours or days of +data. Hence, a data part can be deleted only **when fully outside the configured retention**. +See more about partitions and parts [here](#Storage). The maximum disk space usage for a given `-retentionPeriod` is going to be (`-retentionPeriod` + 1) months. For example, if `-retentionPeriod` is set to 1, data for January is deleted on March 1st. -Please note, the time range covered by data part is not limited by retention period unit. Hence, data part may contain data -for multiple days and will be deleted only when fully outside the configured retention. - It is safe to extend `-retentionPeriod` on existing data. If `-retentionPeriod` is set to a lower value than before, then data outside the configured period will be eventually deleted. diff --git a/docs/README.md b/docs/README.md index 29bcdf671..290bb47eb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1581,19 +1581,22 @@ See also [how to work with snapshots](#how-to-work-with-snapshots). ## Retention -Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. The default retention period is one month. The minimum retention period is 24h or 1d. +Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit +character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. +For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. +The default retention period is one month. The **minimum retention** period is 24h or 1d. Data is split in per-month partitions inside `<-storageDataPath>/data/{small,big}` folders. -Data partitions outside the configured retention are deleted on the first day of the new month. -Each partition consists of one or more data parts. Data parts outside the configured retention are eventually deleted during -[background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +**Data partitions** outside the configured retention are deleted **on the first day of the new month**. +Each partition consists of one or more **data parts**. Data parts outside the configured retention +are **eventually deleted** during [background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +The time range covered by data part is **not limited by retention period unit**. One data part can cover hours or days of +data. Hence, a data part can be deleted only **when fully outside the configured retention**. +See more about partitions and parts [here](#Storage). The maximum disk space usage for a given `-retentionPeriod` is going to be (`-retentionPeriod` + 1) months. For example, if `-retentionPeriod` is set to 1, data for January is deleted on March 1st. -Please note, the time range covered by data part is not limited by retention period unit. Hence, data part may contain data -for multiple days and will be deleted only when fully outside the configured retention. - It is safe to extend `-retentionPeriod` on existing data. If `-retentionPeriod` is set to a lower value than before, then data outside the configured period will be eventually deleted. @@ -1662,9 +1665,6 @@ Downsampling happens during [background merges](https://docs.victoriametrics.com and can't be performed if there is not enough of free disk space or if vmstorage is in [read-only mode](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode). -When setting multiple downsampling periods, it is required for the periods to be multiples of each other. For example, -`-downsampling.period=30d:1m,60d:30m` is valid, but `-downsampling.period=30d:45s,60d:60s` is invalid. - The downsampling can be evaluated for free by downloading and using enterprise binaries from [the releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases). ## Multi-tenancy diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 715b3fcb2..e410aedf9 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -1589,19 +1589,22 @@ See also [how to work with snapshots](#how-to-work-with-snapshots). ## Retention -Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. The default retention period is one month. The minimum retention period is 24h or 1d. +Retention is configured with the `-retentionPeriod` command-line flag, which takes a number followed by a time unit +character - `h(ours)`, `d(ays)`, `w(eeks)`, `y(ears)`. If the time unit is not specified, a month is assumed. +For instance, `-retentionPeriod=3` means that the data will be stored for 3 months and then deleted. +The default retention period is one month. The **minimum retention** period is 24h or 1d. Data is split in per-month partitions inside `<-storageDataPath>/data/{small,big}` folders. -Data partitions outside the configured retention are deleted on the first day of the new month. -Each partition consists of one or more data parts. Data parts outside the configured retention are eventually deleted during -[background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +**Data partitions** outside the configured retention are deleted **on the first day of the new month**. +Each partition consists of one or more **data parts**. Data parts outside the configured retention +are **eventually deleted** during [background merge](https://medium.com/@valyala/how-victoriametrics-makes-instant-snapshots-for-multi-terabyte-time-series-data-e1f3fb0e0282). +The time range covered by data part is **not limited by retention period unit**. One data part can cover hours or days of +data. Hence, a data part can be deleted only **when fully outside the configured retention**. +See more about partitions and parts [here](#Storage). The maximum disk space usage for a given `-retentionPeriod` is going to be (`-retentionPeriod` + 1) months. For example, if `-retentionPeriod` is set to 1, data for January is deleted on March 1st. -Please note, the time range covered by data part is not limited by retention period unit. Hence, data part may contain data -for multiple days and will be deleted only when fully outside the configured retention. - It is safe to extend `-retentionPeriod` on existing data. If `-retentionPeriod` is set to a lower value than before, then data outside the configured period will be eventually deleted. @@ -1670,9 +1673,6 @@ Downsampling happens during [background merges](https://docs.victoriametrics.com and can't be performed if there is not enough of free disk space or if vmstorage is in [read-only mode](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode). -When setting multiple downsampling periods, it is required for the periods to be multiples of each other. For example, -`-downsampling.period=30d:1m,60d:30m` is valid, but `-downsampling.period=30d:45s,60d:60s` is invalid. - The downsampling can be evaluated for free by downloading and using enterprise binaries from [the releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases). ## Multi-tenancy