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

use a parking-lot mutex in Context #2885

Merged
merged 8 commits into from
Apr 20, 2023
Merged

use a parking-lot mutex in Context #2885

merged 8 commits into from
Apr 20, 2023

Conversation

Geal
Copy link
Contributor

@Geal Geal commented Mar 31, 2023

context: #2751
splitting part of the work from #2796

The context requires synchronized access to the busy timer, and precedently we used a futures aware mutex for that, but those are susceptible to contention. This replaces that mutex with a parking-lot synchronous mutex that is much faster.

@github-actions

This comment has been minimized.

@Geal Geal requested review from garypen and bnjjj April 17, 2023 10:42
@Geal Geal marked this pull request as ready for review April 17, 2023 10:49
@Geal Geal changed the base branch from dev to staging-perf April 18, 2023 08:59
@Geal Geal merged commit e691bde into staging-perf Apr 20, 2023
@Geal Geal deleted the geal/context-mutex branch April 20, 2023 09:25
Geal added a commit that referenced this pull request Apr 25, 2023
The context requires synchronized access to the busy timer, and
precedently we used a futures aware mutex for that, but those are
susceptible to contention. This replaces that mutex with a parking-lot
synchronous mutex that is much faster.
Geal added a commit that referenced this pull request May 15, 2023
Batch of performance improvements:

* linux: replace default allocator with jemalloc (#2882) 
* Add a private part to the Context structure (#2802) 
* lighter path manipulation in response formatting (#2854) 
* prevent span attributes from being formatted to write logs (#2890) 
* Parse Accept headers once instead of three times (#2847) 
* use a parking-lot mutex in Context (#2885) 
* Filter spans before sending them to the opentelemetry layer (#2894)
@BrynCooke BrynCooke mentioned this pull request May 19, 2023
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