cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Rajiullah Shammi <mrshammi_at_gmail.com>
Date: Wed, 25 May 2016 17:05:04 +0200

On Mon, May 16, 2016 at 1:11 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> 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.
>

After following the conversation here,
https://curl.haxx.se/mail/lib-2016-03/0126.html
I made some more tests to confirm if window size is also biasing my
results. In my tests, connection window
turned out to be an important component. In this test, I concurrently
requests a small number of resources (12) from the server over http2.
I used both libcurl based client and the nghttp http2 client. By increasing
the connection window size in the nghttp, I see an improvement
over 20% as compared to https with 6 concurrent connections and over 51%
as compared to the libcurl based one. I tried this patch
https://github.com/curl/curl/compare/master...Moliholy:http2-window in curl
to change the connection window size. However, I have not got any
improvement. The server traces look the same, the server often waiting for
window update request. By the way, unlike my last test scenario,
I have only increased the tcp buffer sizes up to 16 MB. So, somehow I have
not been successful to change the default connection window size in nghttp
library for libcurl.

\
Mohd. Rajiullah

>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

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