Extremely High CPU usage in idle cluster

Hello!

I’m experiencing high CPU usage in an almost idle cluster, version 20.1.4:

This is one of the servers:

As you can see, they are super beefy.

And finally, there is not much going on the server:

We are running them like this, using Docker:

docker run -d -p 26257:26257 -p 8085:8080 -v /var/cockroach-data:/cockroach/cockroach-data -v /var/datomia/certs:/etc/ssl/private --name cockroach cockroachdb/cockroach:v20.1.6 start --insecure --advertise-addr=10.67.42.157 --join=10.67.42.157,10.67.42.158,10.67.42.159,10.73.158.2,10.73.158.3,10.73.158.4,10.167.64.240,10.167.64.241,10.167.64.242 --locality=region=cdmx,zone=cdmx1

Upgrading to 20.1.6 did not seem to help at all.

Hi Luis,

You could try taking a CPU profile (https://wiki.crdb.io/wiki/spaces/CRDB/pages/73203940/Profiling+CockroachDB) during one of the high CPU events, that can help figure out what is going on. Other than that, try looking at the logs and other timeseries metrics to see if you can correlate the CPU spikes with any other spikes - often that can help triangulate what is going on.

Cheers,
Jordan

Jordan,

I manage to find the conflicting query, is this one:

https://github.com/cockroachdb/cockroach/files/5287595/stmt-bundle-593226799923298309.zip

It is weird, since it worked just fine at 2.1.4, but had to upgrade due to another issue to 2.1.6.