network-mux weighted fair queueing and token bucket for burst support#5322
Open
crocodile-dentist wants to merge 17 commits intomainfrom
Open
network-mux weighted fair queueing and token bucket for burst support#5322crocodile-dentist wants to merge 17 commits intomainfrom
crocodile-dentist wants to merge 17 commits intomainfrom
Conversation
42d7b13 to
6174c55
Compare
5d5b414 to
8910846
Compare
8910846 to
c5cdc95
Compare
Always bursting when possible should fill kernel buffer asap to beat a looming GC pause
70c7a0b to
b264c3a
Compare
The test has been enhanced to cover biased queuing
b264c3a to
f20cd81
Compare
* added type signatures * change argument order of `processSingleWanton` * added `SDUWithWantonState` * added bangs to all `go` definitions
Added dedicated API: * `NextSDUSize`, `nextSDUSizeToSDUSize` * `TokenSize` (type alias), `consumedTokens`
An explicit loop is easier to follow. We also avoid calling `error "impossible"`.
Replaced a custom `allM` with `foldMap All . traverse`. In the future we can fuse `foldMap` with `traverse`.
Move constants to top level bindings: * `maxSDUsPerBatch` * `burstMinSdu`
Replaced `Bool` with: * `CanBatch` - can we batch more SDUs from different mini-protocols. * `CanBurst` - can we burst more SDUs from a single mini-protocol.
Use an explicit loop in `muxer`, as a result `transformers` dependency is gone.
Refactor `muxerLoop` It's easier to read `[(EgressQueue m, [(Word8, Egress m)])]`, than the other way around, since then it's the `EgressQueue` we read and its tail much like `x : xs`. This also avoids using `traverse` over tuple which is a bit surprising.
Use DuplicateRecordFields for: * `Wanton` * `TranslocationServiceRequest` * `ProtocolBurst` These are all internal data types, so we won't force it on `network-mux` user.
…rformance Code refactoring
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.
Description
Checklist
Quality
Maintenance
ouroboros-networkproject.