perf: batch inbound WINDOW_UPDATE frames - #271
Open
anmonteiro wants to merge 1 commit into
Open
Conversation
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.
Summary
WINDOW_UPDATEcredit instead of emitting one frame per body read callbackWhy
On large uploads, h2 was returning flow-control credit on every consumed chunk at both the connection and stream levels. Under the 1.5 GiB curl upload benchmark, that creates heavy write-loop churn and a large number of control frames.
Validation
dune build --display=short @runtest-test_h2 @runtest-test_h2_client @runtest-test_h2_server spec/eio_h2spec.exeBenchmark
Using the existing 1.5 GiB curl upload benchmark against the Eio server, with the same local
glutencheckout in both variants:cb71ce5):4.168s,368.52 MiB/s;4.156s,369.57 MiB/s3.231s,475.41 MiB/s;3.175s,483.73 MiB/sThis is about a 29-31% throughput improvement on this workload.