DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Lease Coordination Under Serializable Isolation in CockroachDB
  • Navigate Serverless Databases: A Guide to the Right Solution
  • Connection Pool High Availability With CockroachDB and PgCat
  • CockroachDB TIL: Volume 11

Trending

  • AI Governance by Design: From Model Risk to Production Accountability
  • Apex Testing: Tips for Writing Robust Salesforce Test Methods
  • API Regression Testing for Event-Driven Systems: Catching Breaking Changes in Async APIs
  • Everything About HTTPS and SSL in Java

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. CockroachDB Admission Control

CockroachDB Admission Control

See one way to solve a CPU imbalance using Admission Control.

By 
Michael Goddard
·
Dec. 09, 21 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
5.5K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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.


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 November 16 — version 21.2.0 has just been released, 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. 21.2.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.


CPU utilization on the three nodes now tracks to within about 3%, which is about as close as one could hope for. 

The new release is available here.

CockroachDB

Published at DZone with permission of Michael Goddard. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Lease Coordination Under Serializable Isolation in CockroachDB
  • Navigate Serverless Databases: A Guide to the Right Solution
  • Connection Pool High Availability With CockroachDB and PgCat
  • CockroachDB TIL: Volume 11

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook