cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP 2.0 performance is slower than HTTP 1.1 in libcurl

From: Rajiullah Shammi <mrshammi_at_gmail.com>
Date: Wed, 25 May 2016 22:26:19 +0200

On Mon, May 23, 2016 at 4:16 PM, Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
wrote:

> Hi,
>
> On Mon, May 23, 2016 at 9:28 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Mon, 23 May 2016, Tatsuhiro Tsujikawa wrote:
>>
>> In my opinion, I recommend to keep using nghttp2's auto WINDOW_UPDATE
>>> feature while enlarging window size to 512MiB unless you'd want to
>>> implement custom WINDOW_UPDATE scheduler. With large WINDOW_SIZE, nghttp2
>>> will send WINDOW_UPDATE less frequently (current implementation, it sends
>>> WINDOW_UPDATE when it receives 256MiB without sending any WINDOW_UPDATE).
>>>
>>> Bumping up window size of connection should be done in initialization
>>> phase, e.g., after nghttp2_submit_settings in http2_switched.
>>>
>>
>> Right, thanks for that input. I agree that it seems like the smartest
>> approach.
>>
>> Speaking of this (changing the window size), I was trying to find the
>> automated sizing logic documented on the nghttp2.org web site but I
>> failed, did I just not look at the right place?
>>
>>
> ​We haven't written anything about it since it is rather implementation
> detail. The current implementation keeps track of the amount of DATA
> received without acking with WINDOW_UPDATE, and if it reaches the half of
> window size (e.g., 256MiB in case of 512MiB), send WINDOW_UPDATE with the
> received bytes as increment.
>
> Best regards,
> Tatsuhiro Tsujikawa
>

Hi!

I have some new results.
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 six 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
>

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