What should be the memory usage alert criteria for Cockroachdb running in Kubernetes?

6/5/2020

I am using cockroach DB cluster on GKE and I'm monitoring with Prometheus and have imported this Grafana Dashboard

However, there are 4 types of RAM usage within the graph(RSS, goallocated,gototal,cgo allocated), therefore I'm not able to decide on which parameter there is possibility of high RAM usage and how can I set an alert?

Can you please guide If anyone of you have used this before?

-- Mitesh Gangaramani
cockroachdb
google-kubernetes-engine
kubernetes

1 Answer

6/5/2020

You want to monitor RSS (Resident set size) and compare it against the maximum amount of virtual memory you want CockroachDB to use.

The others metrics as documented here are:

  • RSS: Total memory in use by CockroachDB.
  • Go Allocated: Memory allocated by the Go layer.
  • Go Total: Total memory managed by the Go layer.
  • CGo Allocated: Memory allocated by the C layer.
  • CGo Total: Total memory managed by the C layer.
-- Marc
Source: StackOverflow