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

Add evb violation counter for exchange client and http server IO threadpool #24545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kewang1024
Copy link
Collaborator

@kewang1024 kewang1024 commented Feb 12, 2025

When prestissimo worker is busy on CPU, we observed delays in exchange connection.
Add evb violation for exchange client IO thread pool and exchange server IO thread pool
to give us better visibility.

== NO RELEASE NOTE ==

@kewang1024 kewang1024 requested a review from a team as a code owner February 12, 2025 21:40
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Feb 12, 2025
@facebook-github-bot
Copy link
Collaborator

@kewang1024 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Collaborator

@kewang1024 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Collaborator

@kewang1024 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Collaborator

@kewang1024 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Comment on lines +533 to +538
for (auto evb : httpSrvIoExecutor_->getAllEventBases()) {
evb->setMaxLatency(
std::chrono::milliseconds(systemConfig->httpSrvIoEvbViolationThresholdMs()),
[]() { RECORD_METRIC_VALUE(kCounterHttpServerIoEvbViolation, 1); },
false);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this setMaxLatency() for?
For executing http callback?
So what we doing here is setting a latency for our callbacks and if it is breached the given functor will be executed?
Do we suspect some of our callbacks talking long time on http executor?

Will this setMaxLatency() fail the http call if limit breached?

@kewang1024 kewang1024 changed the title Add evb violation counter for exchange io and http server io threadpool Add evb violation counter for exchange client and http server IO threadpool Feb 13, 2025
@@ -409,6 +409,12 @@ void PrestoServer::run() {
<< exchangeHttpIoExecutor_->getName() << "' has "
<< exchangeHttpIoExecutor_->numThreads()
<< " threads.";
for (auto evb : exchangeHttpIoExecutor_->getAllEventBases()) {
evb->setMaxLatency(
Copy link
Contributor

@aditi-pandit aditi-pandit Feb 13, 2025

Choose a reason for hiding this comment

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

@kewang1024 : What is this for ? How do we turn this off ? Since we have a platform offering we would want to make this user (our client) configurable.

Are there any instructions for us on how to tune this for different clusters ?

@majetideepak @czentgr

Copy link
Contributor

Choose a reason for hiding this comment

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

If this is user-configurable, documentation should be included in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:Meta PR from Meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants