CockroachDB Admission Control? Yes, please!

CockroachDB Admission Control? Yes, please!

CockroachDB 22.1

Learn what’s new, how the updates help you, and how to use the new features of CockroachDB 22.1.

Release Details

Last week, while running a workload consisting of 200 different queries, we noticed right away that a CPU imbalance was causing a performance issue. Looking at the first graph, below, you can see right away that one of the three CockroachDB nodes was operating at near 100% CPU. Not ideal.

Admission_Control_before.jpg

At the time we installed that cluster, we utilized version 21.1.11 of CockroachDB, which was the most current. Now fast forward in time to today – version 22.1 will be released in days, with a new feature called Admission Control. From the docs for this new feature, one scenario where Admission Control can help is when

The node has high CPU usage, visible in the CPU percent graph …

Bingo! We decided to give it a go and see if Admission Control could solve our problem.

We performed a zero-downtime, rolling upgrade to v. 22.1.0 and then enabled Admission Control via three SQL commands, as shown here:

set cluster setting admission.kv.enabled = true;
set cluster setting admission.sql_kv_response.enabled = true;
set cluster setting admission.sql_sql_response.enabled = true;

The CPU percent graph in DB Console showed an immediate improvement. We let the workload run for several hours and took a screenshot of the current CPU utilization across the cluster.

Admission_Control_after.jpg

CPU utilization on the three nodes now tracks to within about 3%, which is about as close as one could hope for. What else could we call this feature? “My New Super Power”, “Auto Pilot”, “Guardrails”? Amazing, in any case, and a great example of the type of thoughtful features the brilliant development team at Cockroach Labs builds into each new release.

I encourage you to try this yourself. Stay in the loop with all the 22.1 release features right here.

Keep Reading

No time to live: James Bond explains row-level time to live

Do you know what time it is? Time to die.

-Nomi

That’s it. That’s row-level TTL in a James Bond nutshell. Which is …

Read more
3 basic rules for choosing indexes

3 basic rules for choosing indexes

There are a few basic rules to keep in mind when choosing indexes for a database. A …

Read more
Java and AWS Lambda: Best of frenemies?

*Guest post alert! Mike Roberts has been an engineer as well as a CTO. He is the co-author of this O’Reilly Book …

Read more