-
Notifications
You must be signed in to change notification settings - Fork 461
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
pageserver: option to run with just one tokio runtime #7331
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR allows running the pageserver with a single tokio runtime.
…hread and multi_thread:$num_workers
We need to have &'static Runtime, not &'static Handle, because &'static Handle doesn't drive IO/timers on current_thread RT.
This was referenced Apr 5, 2024
2754 tests run: 2630 passed, 0 failed, 124 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
aa5439c at 2024-04-08T13:17:09.005Z :recycle: |
problame
added a commit
that referenced
this pull request
Apr 8, 2024
) It's just unnecessary to use spawn_blocking there, and with #7331 , it will result in really just one executor thread when enabling one-runtime with current_thread executor.
VladLazar
approved these changes
Apr 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an off-by-default revision v2 of the (since-reverted) PR #6555 / commit
3220f830b7fbb785d6db8a93775f46314f10a99b
.See that PR for details on why running with a single runtime is desirable and why we should be ready.
We reverted #6555 because it showed regressions in prodlike cloudbench, see the revert commit message
ad072de4209193fd21314cf7f03f14df4fa55eb1
for more context.This PR makes it an opt-in choice via an env var.
The default is to use the 4 separate runtimes that we have today, there shouldn't be any performance change.
I tested manually that the env var & added metric works.
I want to use this change to do more manualy testing and potentially testing in staging.
Future Work
Testing / deployment ergonomics would be better if this were a variable in
pageserver.toml
.It can be done, but, I don't need it right now, so let's stick with the env var.