-
Notifications
You must be signed in to change notification settings - Fork 4
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
Make HTTP2 window size configurable #145
Comments
I just noticed |
I have confirmed that the recent patch to http-semantics fixes the bus errors/segfaults we saw here when adjusting the window size. I have also confirmed that lowering the window size does indeed lower heap residency in the receiver for our stress test. The default connection window size in http2 is relatively large (1048576 bytes), so the stress test was is actually limited by the initial window size in ![]() Halving that initial window size manually in grapesy with something like this in ...
, HTTP2.Client.settings =
(HTTP2.Client.settings HTTP2.Client.defaultClientConfig)
{ HTTP2.Client.initialWindowSize = 262144 `div` 2
}
... the residency drops: ![]() Halving it again: ![]() So making the http2 window size configurable does seem like it would be a good improvement. |
Ok, awesome. Good to know that our understanding of the memory behaviour is correct now. Let's add a grapesy flag that allows to set these two parameters, and when we document memory behaviour in the yet-to-be-written manual, we should mention this. |
Relevant: kazu-yamamoto/http2#121 (comment) |
We need four parameters to be configurable:
and we should also pick our own defaults independent from the defaults from We need to ensure that we document in the Haddocks the relationship between these three parameters. |
Increasing priority to high due to #169 (comment) . |
http2
uses a default connection window size of 1MB per connection and 256KB per stream, which can cause data to pile up on a receiver's heap if they can't keep up. We've observed this in the stress tests. The standard fix for this is to reduce the window size.http2
makes this configurable, although a brief test where we tried to reduce the window size on the client led to bus errors in the server. We should make this configurable ingrapesy
as well, and see if we can avoid/fix the bus errors.The text was updated successfully, but these errors were encountered: