cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Page load time comparison between h1 and h2 using libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 16 May 2016 13:11:07 +0200 (CEST)

On Mon, 16 May 2016, Rajiullah Shammi wrote:

> I made a very simple performance test between h1 (https) and h2 in a no loss
> scenario. With h1, I used 6 parallel connections to make 55 requests ( the
> number and size of the requests are taken from a real page). I did the same
> with h2 using a single connection. Both of the clients are made based on the
> example (10-at-a-time.c and http-download.c+https.c) given in libcurl page.
> Basically, I was expecting both protocols should have given similar
> performance (page load time). However, h2 turned out to be much slower. So,
> I am not sure what I am missing here.

Hello!

Thanks for taking your time and running h1-h2 curl comparisons. We need this.
The focus on the HTTP/2 implementation has so far been getting it technically
right and working rather than to make sure that it offers stellar performance.
But of course we need to learn about the flaws first to allow us to work on
them.

I'd be helpful if a comparison test would:

1. explain more about exactly what the test does for both protocols, in terms
of connections, transfers and sizes

2. detail which libcurl version, nghttp2 version, TLS backend and version. And
then possibly even making sure that the h1 and h2 versions are using the same
TLS ciphers and configs. Which servers do you use for the test, any particular
configs for that? What's the MAX_CONCURRENT_STREAMS value in the h2 case?

3. explain the network characteristics between the client and the server.
What's the RTT time and expected bandwidth limit?

4. Maybe consider putting the source code for the test somewhere for
inspection and ability to run tests in more places with other versions and
other network setups.

I appreciate the PCAPs attached, but I think it would be better to start out
with the high level info mentioned above so that we better understand what to
look for in those.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-16