-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(server): Use a single tokio runtime, adjust processor task count #3516
Conversation
bedbba1
to
bf1ed87
Compare
bf1ed87
to
8c3d622
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me but I'm nervous about shipping this. Should we run it on the load tester first? Or let it sit on Canary for a week before we deploy it to all pods?
We can, but I don't see this as risky and would have moved on from canary and S4S after a workday. |
@@ -586,7 +586,7 @@ struct Limits { | |||
max_replay_message_size: ByteSize, | |||
/// The maximum number of threads to spawn for CPU and web work, each. | |||
/// | |||
/// The total number of threads spawned will roughly be `2 * max_thread_count + 1`. Defaults to | |||
/// The total number of threads spawned will roughly be `2 * max_thread_count`. Defaults to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add to this comment that Relay will use at most max_thread_count
CPU?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current setup this isn't gurantueed right? If the runtime needs more processing power than expected it can go over.
0 | 1 => 1, | ||
2 | 3 => 2, | ||
4 => 3, | ||
conc => conc - 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you run load tests with this? It would be good to know the actual needs here, if this is easy to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this was simply a best effort guess for small amounts of cores going off our discussed -2
starting point.
Having a small amount of cores would reserve a much bigger % to the runtime than if we have a large amount of cores. E.g. for 2 cores allocating 1 thread to the processor would allocate 50% to the runtime, while having 12 cores only allocates 17% to the runtime.
As described in #3513.
Will be followed by an ops PR to adjust configuration settings.