diff --git a/v1.2/admin-ui-overview-dashboard.md b/v1.2/admin-ui-overview-dashboard.md index 30ed3df9592..bc649c57e08 100644 --- a/v1.2/admin-ui-overview-dashboard.md +++ b/v1.2/admin-ui-overview-dashboard.md @@ -40,6 +40,8 @@ Ranges are subsets of your data, which are replicated to ensure survivability. R For details about how to control the number and location of replicas, see [Configure Replication Zones](configure-replication-zones.html). +{{site.data.alerts.callout_info}}The timeseries data used to power the graphs in the admin UI is stored within the cluster and accumulates for 30 days before it starts getting truncated. As a result, for the first 30 days or so of a cluster's life, you will see a steady increase in disk usage and the number of ranges even if you aren't writing data to the cluster yourself. For more details, see this FAQ.{{site.data.alerts.end}} + ## Capacity CockroachDB Admin UI Capacity graph diff --git a/v1.2/operational-faqs.md b/v1.2/operational-faqs.md index e68aff8dfd4..2887557ac3f 100644 --- a/v1.2/operational-faqs.md +++ b/v1.2/operational-faqs.md @@ -2,6 +2,7 @@ title: Operational FAQs summary: Get answers to frequently asked questions about operating CockroachDB. toc: false +toc_not_nester: true ---
@@ -35,9 +36,28 @@ Like most databases, CockroachDB caches the most recently accessed data in memor ## Why is disk usage increasing despite lack of writes? -The timeseries data used to power the graphs in the admin UI is stored within the cluster and accumulates for 30 days before it starts getting truncated. As a result, for the first 30 days or so of a cluster's life you will see a steady increase in disk usage and the number of ranges in the cluster even if you aren't writing data to it yourself. +The timeseries data used to power the graphs in the admin UI is stored within the cluster and accumulates for 30 days before it starts getting truncated. As a result, for the first 30 days or so of a cluster's life, you will see a steady increase in disk usage and the number of ranges even if you aren't writing data to the cluster yourself. -As of the 1.0 release, there is no way to change the number of days before timeseries data gets truncated. As a workaround, however, you can start each node with the `COCKROACH_METRICS_SAMPLE_INTERVAL` environment variable set higher than its default of `10s` to store fewer data points. For example, you could set it to `1m` to only collect data every 1 minute, which would result in storing 6x less timeseries data than the default setting. +To truncate timeseries data sooner, you can change the `timeseries.resolution_10s.storage_duration` cluster setting to an [`INTERVAL`](interval.html) value less than `720h0m0s` (30 days). For example, to truncate timeseries data after 15 days, you would execute the following [`SET CLUSTER SETTING`](set-cluster-setting.html) command: + +{% include copy-clipboard.html %} +~~~ sql +> SET CLUSTER SETTING timeseries.resolution_10s.storage_duration = '360h0m0s'; +~~~ + +{% include copy-clipboard.html %} +~~~ sql +> SHOW CLUSTER SETTING timeseries.resolution_10s.storage_duration; +~~~ + +~~~ ++--------------------------------------------+ +| timeseries.resolution_10s.storage_duration | ++--------------------------------------------+ +| 360h | ++--------------------------------------------+ +(1 row) +~~~ ## Why does CockroachDB collect anonymized cluster usage details by default?