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
HTTP/2 downloads slower with default flow control #1102
Comments
Correct, we should start with fixing the h2 window use as mentioned in the TODO. |
I can reproduce with that website but I tried retrieving the same file from a local server Apache/2.4.18 w/nghttp2 and the difference isn't significant it averaged .004s real faster for http1.1. Since it is local I guess that's to be expected. How do we do this, if I change /cc @tatsuhiro-t |
The delay is caused by the latency between the moment sender blocked due to window size and the moment it receives WINDOW_UPDATE. The local server (loopback?) has low latency, so the difference is not significant. I think you should also enlarge connection level flow control window by calling |
- Improve performance by using a huge HTTP/2 window. Bug: curl#1102 Reported-by: afrind@users.noreply.github.com Assisted-by: Tatsuhiro Tsujikawa
Yup that did it, thanks. It only works if I do both. Here is the first draft https://github.com/curl/curl/compare/master...jay:use_large_http2_window?expand=1 |
Looks good to me! |
Looks good to me too. |
- Improve performance by using a huge HTTP/2 window size. Bug: #1102 Reported-by: afrind@users.noreply.github.com Assisted-by: Tatsuhiro Tsujikawa
Thanks guys. I just landed this in a4d8888 from a second draft, which has these changes from draft1:
|
Great work @jay, I've wanted to see this done for a while but I never manged to pull myself together to get it done. Now you did it. Thanks! |
Thanks all! From: Daniel Stenberg notifications@github.com Great work @jayhttps://github.com/jay, I've wanted to see this done for a while but I never manged to pull myself together to get it done. Now you did it. Thanks! — |
Downloading a large object is much slower using HTTP/2. I peeked at the code and I'm pretty sure curl is using the default flow control window (65k). This is pretty small (I think Chrome opens the window to 10MB? by default). I didn't see an option to use a larger flow control window. I suggest that curl use a larger buffer by default and provide an option to use a larger one. Here's an example of pulling a 23MB image with a 33ms RTT:
HTTP/1.1
HTTP/2
curl -V
The text was updated successfully, but these errors were encountered: