diskbandwidthcockroachdb

How do I see CockroachDB's disk bandwidth consumption?


When running a CockroachDB cluster, how can I view the disk bandwidth being consumed by nodes? This can be useful to tell if disk bandwidth is a bottleneck. Also, is there any visibility into the source of the disk writes?


Solution

  • CockroachDB collects write metrics both from the host's operating system and internally through its own accounting of writes. In the CockroachDB DB Console, the "Hardware" dashboard includes 'Disk Write' and 'Disk Write iops' graphs. These are the metrics reported from the operating system, including write volume external to the process.

    Screenshot of the CockroachDB Hardware dashboard

    These graphs can be a great first step gain visibility into the write volume in your node. If you're concerned that your nodes are hitting their bandwidth or IOPs limits, look for plateaus. You can also drill down to a single node, view the maximum throughput usage and compare that to the documented limits for your storage medium.

    If you want to drill deeper, CockroachDB records write volume of many internal operations. In the DB Console, click on "Advanced Debug" on the left menu. Then select "Custom Time Series Chart." Here you can create custom graphs pulling in metrics that aren't surfaced in some of the premade dashboards. Some of the disk-bandwidth metrics available are:

    Screenshot of the custom time series configuration Screenshot of the custom time series graph