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

admission: fix wait queue histograms #110060

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

irfansharif
Copy link
Contributor

We previously did not record anything into {IO,CPU} wait queue histograms when work either bypassed admission control (because of the nature of the work, or when certain admission queues were disabled through cluster settings). This meant that our histogram percentiles were not accurate.

This problem didn't exist at the flow control level where work may not be subject to flow control depending on the mode selected ('apply_to_elastic', 'apply_to_all'). We'd still record a measured wait duration (~0ms), so we had accurate waiting-for-flow-tokens histograms.

Part of #82743.

Release note: None

@irfansharif irfansharif requested a review from a team as a code owner September 5, 2023 20:40
@blathers-crl
Copy link

blathers-crl bot commented Sep 5, 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

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bananabrick and @irfansharif)


pkg/util/admission/work_queue.go line 639 at r1 (raw file):

		if q.granter.tryGet(info.RequestedCount) {
			q.admitMu.Unlock()
			q.metrics.incAdmitted(info.Priority)

what about this case?

We previously did not record anything into {IO,CPU} wait queue
histograms when work either bypassed admission control (because of the
nature of the work, or when certain admission queues were disabled
through cluster settings) or used the fast-path (i.e. didn't add
themselves to the tenant heaps). This meant that our histogram
percentiles were not accurate.

NB: This problem didn't exist at the flow control level where work may
not be subject to flow control depending on the mode selected
('apply_to_elastic', 'apply_to_all'). We'd still record a measured wait
duration (~0ms), so we had accurate waiting-for-flow-tokens histograms.

Part of cockroachdb#82743.

Release note: None
Copy link
Contributor Author

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @bananabrick and @sumeerbhola)


pkg/util/admission/work_queue.go line 639 at r1 (raw file):

Previously, sumeerbhola wrote…

what about this case?

Done.

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @bananabrick)

@irfansharif
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 6, 2023

Build succeeded:

@craig craig bot merged commit 4ad7b7b into cockroachdb:master Sep 6, 2023
@irfansharif irfansharif deleted the 230905.ac-histogram branch September 19, 2023 21:03
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