Conversation
We don't have any blockers to using the threaded runtime by default. This change adds the `multicore` feature flag to the default feature list. It also modifies the threaded runtime initialization to use all available cores. The thread names have been changed from `linkerd2-proxy-worker` to just `proxy`, which is more consistent with the `admin` thread name. This should be unambiguous in the context of the process.
olix0r
commented
Jul 31, 2020
| pub(crate) fn build() -> Runtime { | ||
| let builder = runtime::Builder::new() | ||
| .enable_all() | ||
| .thread_name("linkerd2-proxy-worker"); |
Member
Author
There was a problem hiding this comment.
afaict this didn't actually compile this way
olix0r
commented
Jul 31, 2020
hawkw
approved these changes
Jul 31, 2020
Contributor
hawkw
left a comment
There was a problem hiding this comment.
couple of nits, LGTM otherwise.
Comment on lines
+5
to
+7
| // The proxy creates an additional admin thread, but it would be wasteful to allocate a whole | ||
| // core to it; so we let the main runtime consume all cores the process has. The basic scheduler | ||
| // is used when the threaded scheduler would provide no benefit. |
Member
Author
Pin max_threads to core_threads. Fixup panic message Co-authored-by: Eliza Weisman <[email protected]>
olix0r
added a commit
to linkerd/linkerd2
that referenced
this pull request
Aug 5, 2020
This release enables a multi-threaded runtime. Previously, the proxy would only ever use a single thread for data plane processing; now, when the proxy is allocated more than 1 CPU share, the proxy allocates a thread per available CPU. This has shown substantial latency improvements in benchmarks, especially when the proxy is serving requests for many concurrent connections. --- * Add a `multicore` feature flag (linkerd/linkerd2-proxy#611) * Add `multicore` to default features (linkerd/linkerd2-proxy#612) * admin: add an endpoint to dump spawned Tokio tasks (linkerd/linkerd2-proxy#595) * trace: roll `tracing` and `tracing-subscriber` dependencies (linkerd/linkerd2-proxy#615) * stack: Add NewService::into_make_service (linkerd/linkerd2-proxy#618) * trace: tweak tracing & test support for the multithreaded runtime (linkerd/linkerd2-proxy#616) * Make FailFast cloneable (linkerd/linkerd2-proxy#617) * Move HTTP detection & server into linkerd2_proxy_http (linkerd/linkerd2-proxy#619) * Mark tap integration tests as flakey (linkerd/linkerd2-proxy#621) * Introduce a SkipDetect layer to preempt detection (linkerd/linkerd2-proxy#620)
adleong
pushed a commit
to linkerd/linkerd2
that referenced
this pull request
Aug 6, 2020
This release enables a multi-threaded runtime. Previously, the proxy would only ever use a single thread for data plane processing; now, when the proxy is allocated more than 1 CPU share, the proxy allocates a thread per available CPU. This has shown substantial latency improvements in benchmarks, especially when the proxy is serving requests for many concurrent connections. --- * Add a `multicore` feature flag (linkerd/linkerd2-proxy#611) * Add `multicore` to default features (linkerd/linkerd2-proxy#612) * admin: add an endpoint to dump spawned Tokio tasks (linkerd/linkerd2-proxy#595) * trace: roll `tracing` and `tracing-subscriber` dependencies (linkerd/linkerd2-proxy#615) * stack: Add NewService::into_make_service (linkerd/linkerd2-proxy#618) * trace: tweak tracing & test support for the multithreaded runtime (linkerd/linkerd2-proxy#616) * Make FailFast cloneable (linkerd/linkerd2-proxy#617) * Move HTTP detection & server into linkerd2_proxy_http (linkerd/linkerd2-proxy#619) * Mark tap integration tests as flakey (linkerd/linkerd2-proxy#621) * Introduce a SkipDetect layer to preempt detection (linkerd/linkerd2-proxy#620)
This file contains hidden or 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
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.

We don't have any blockers to using the threaded runtime by default.
This change adds the
multicorefeature flag to the default featurelist.
It also modifies the threaded runtime initialization to use all
available cores.
The thread names have been changed from
linkerd2-proxy-workerto justproxy, which is more consistent with theadminthread name. Thisshould be unambiguous in the context of the process.