Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions v1.2/admin-ui-overview-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="operational-faqs.html#why-is-disk-usage-increasing-despite-lack-of-writes">FAQ</a>.{{site.data.alerts.end}}

## Capacity

<img src="{{ 'images/admin_ui_capacity.png' | relative_url }}" alt="CockroachDB Admin UI Capacity graph" style="border:1px solid #eee;max-width:100%" />
Expand Down
24 changes: 22 additions & 2 deletions v1.2/operational-faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Operational FAQs
summary: Get answers to frequently asked questions about operating CockroachDB.
toc: false
toc_not_nester: true
---

<div id="toc"></div>
Expand Down Expand Up @@ -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?

Expand Down