Repository navigation
feat(quic)!: shard the relay's QUIC endpoint per core by default #5688
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
a62b26d
quest: claim quest/m1/quic/fork/switch
kixelated 590d323
feat(moq-tokio): import quinn's async layer and web-transport-moq ver…
kixelated e8195bd
feat(quic)!: run moq-tokio and moq-uring on moq-quic
kixelated 866b13d
fix(moq-tokio): log a CONNECT stream cut off by the close at debug
kixelated 88a6fae
docs: point fork and advisory guidance at moq-quic
kixelated 2d50267
docs: format the upgrade note
kixelated c2993ca
quest: finish quest/m1/quic/fork/switch
kixelated fcd8ea4
Merge origin/main into quest/m1/quic/fork/switch
kixelated 3b50dd6
chore(quest): claim quest/m1/quic/shard
kixelated 0c8cfcc
feat(quic)!: shard the relay's QUIC endpoint per core by default
kixelated e111abf
test(moq-tokio): gate the timed helper with its only caller
kixelated 5b7bff2
Merge origin/main into quest/m1/quic/fork/switch
kixelated 43193f9
Merge remote-tracking branch 'origin/main' into quest-switch-alias
kixelated 188b08c
fix(tokio): mark quic::web and quic::driver error enums non_exhaustive
kixelated 5d21b4f
fix(tokio): count in-flight accepts in wait_all_draining
kixelated 2bbc87d
Merge quest/m1/quic/fork/switch into quest/m1/quic/shard
kixelated 21cac2b
fix(tokio): wake draining waiters when accept empties the queue
kixelated c1f4cfd
fix(tokio): surface non-WouldBlock receive errors, cap moq_quic logs
kixelated ccaae36
fix(tokio): send a stopped worker's closes before dropping its runtime
kixelated f169478
Merge quest/m1/quic/fork/switch into quest/m1/quic/shard
kixelated cdc2660
Merge origin/main into quest/m1/quic/shard
kixelated d50fcb7
Merge origin/main into quest/m1/quic/shard
kixelated 218cbec
feat(relay): keep the shared runtime by default, with sharding opt-in
kixelated 61f2101
Merge origin/main into quest/m1/quic/shard
kixelated 8472b0a
Merge origin/main into quest/m1/quic/shard
kixelated d34978c
fix(quic): issue sharded CIDs from the random generator
kixelated 77eef4b
Merge origin/main into quest/m1/quic/shard
kixelated a9cd8e1
Merge branch 'main' of github.com:moq-dev/moq into quest/m1/quic/shard
kixelated 13155a1
Merge branch 'main' of github.com:moq-dev/moq into quest/m1/quic/shard
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # [M] Shard the relay by default | ||
|
|
||
| ## Goal | ||
|
|
||
| A saturating benchmark shows whether thread-per-core QUIC beats the shared | ||
| runtime, and the relay's default follows the measurement. If sharding wins, | ||
| an unset `runtime.workers` runs one worker per core on Linux, and | ||
| `workers = 0` is the explicit way back to the shared runtime. Off Linux, the | ||
| shared runtime stays the default. | ||
|
|
||
| ## Plan | ||
|
|
||
| Sharding is opt-in: `runtime.workers` is unset by default, and | ||
| `runtime.pin` defaults off. The maintainer decided on #5688 to keep it that | ||
| way until a measurement justifies the flip. | ||
|
|
||
| - Extend `just bench-shard` to load that saturates the shared runtime, for | ||
| example 1024+ connections or more than one load host. At 16 to 256 | ||
| connections, #5688's sweep never used one full core, so it showed no | ||
| regression from sharding and no win either. The 16-shard groups spent about | ||
| 15 to 25% more CPU than the shared runtime at low load, from idle per-core | ||
| runtimes. | ||
| - Flip the default only if sharding raises the throughput ceiling or cuts | ||
| CPU per connection at saturation. A measured no-win deletes this quest. | ||
| - Shard only where a group serves the same listener the shared runtime would | ||
| open. A stream-only relay, or one with a QUIC-LB `lb_id`, stays shared | ||
| unless a count is set. A count sized from `available_parallelism`, capped at | ||
| `moq_sock::shard::MAX_SHARDS`, follows cgroup quotas. | ||
| - With the default flipped, `runtime.io_uring` no longer needs an explicit | ||
| count. | ||
|
|
||
| Update `doc/bin/relay/` for the default change. | ||
|
|
||
| ## Related | ||
|
|
||
| - [kio channel contention](/quest/m2/perf/kio-channel-contention/README.md) - its per-thread spikes run on the workers | ||
| - [UDP demux](/quest/m2/p2p/udp-demux.md) - demuxes each shard's socket |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.