Open domenkozar opened 7 years ago
@tatsuhiro-t
When you discuss pure nghttp2 performance issues you need to use pure nghttp2 and not curl, since curl has its own layers on top that complicates matters. One of curl's long-standing http2 performance issues was recently fixed in this commit: https://github.com/curl/curl/commit/a4d888857ede39a8e2aa5f961048c6362d3a5377
The first example uses pure nghttp2 and comparing to second example using curl you can see they yield same timings.
Good tip though:
$ \time $(nix-build -A nghttp2)/bin/nghttp -w 30 -W 30 https://cache.nixos.org/nar/1wyksagbra4m12z5qka02jnaylc9w93szg36yxm9h4c93bszr0ci.nar.xz > /dev/null
0.10user 0.11system 0:04.54elapsed 4%CPU (0avgtext+0avgdata 6688maxresident)k
0inputs+0outputs (0major+303minor)pagefaults 0swaps
Maybe nghttp2 should change these defaults as well? Or does the RFC specify the default value?
These are default values specified in RFC 7540. The browsers tend to use larger values like 256MiB. Since the goal of nghttp client is debug http2 server, and I don't think it needs to run in optimal speed by effectively disabling flow control. The flow control thing is fragile, and it would be better to turn it on to spot bugs easily. But I agree that this is one of the top question why http2 is slower than http1 in certain cases.
Using nghttp2 1.16.1:
This is on Linux. What's the best way to debug further?