Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: use datum alloc for crdb_internal stmt stats rows #105093

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

dt
Copy link
Member

@dt dt commented Jun 17, 2023

Happened to observe a cluster running a customer test suite which included a query that inspected stmt stats often, causing the CRDB node to spend a considerable amount of CPU time in production of the stmt stats vtable, in particular allocating (and then GC'ing) individual datums, especially given how wide this table has become with the addition of storage stats.

This change uses a datum allocator to produce those rows to reduce the number of separate allocations from the runtime.

Release note: none.
Epic: none.

Happened to observe a cluster running a customer test suite which included a query that
inspected stmt stats often, causing the CRDB node to spend a considerable amount of CPU
time in production of the stmt stats vtable, in particular allocating (and then GC'ing)
individual datums. This change uses a datum allocator to produce those rows to reduce the
number of separate allocations from the runtime.

Release note: none.
Epic: none.
@dt dt requested a review from ericharmeling June 17, 2023 00:22
@dt dt requested a review from a team as a code owner June 17, 2023 00:22
@blathers-crl
Copy link

blathers-crl bot commented Jun 17, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt
Copy link
Member Author

dt commented Jun 20, 2023

TFTR!

bors r+

@rafiss
Copy link
Collaborator

rafiss commented Jun 20, 2023

thanks for the find! i'm a +1 on backporting this if you are.

@craig
Copy link
Contributor

craig bot commented Jun 20, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 20, 2023

Build succeeded:

@craig craig bot merged commit 91f0de4 into cockroachdb:master Jun 20, 2023
@rafiss
Copy link
Collaborator

rafiss commented Jun 20, 2023

blathers backport 23.1 22.2

@blathers-crl
Copy link

blathers-crl bot commented Jun 20, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 86029ce to blathers/backport-release-22.2-105093: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@dt dt deleted the stats-allocs branch June 20, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants