[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618101#comment-16618101
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1942:
-----------------------------------------------

[~rschmitt] I looked into the performance issue you had observed. I upgraded 
our internal HTTP benchmark to support HTTP/2 protocol and ran it against an 
HTTP endpoint that served a fairly large file (~44 MB). I could see no DATA 
frame fragmentation and excessive WINDOW_UPDATE frames. All looked pretty tight 
to me. If the problem exists it is unlikely to be caused by the HTTP/2 
multiplexer. It is more likely the message exchange handler you have used in 
your load test writes data out in small chunks with longer streams under 
certain conditions. Please have look and consider testing your code using 
{{HttpBenchmark}} from httpcore5-testing. It would help improve your code and 
test {{HttpBenchmark}} as well.

Oleg  

{noformat}
<< stream 0 frame: SETTINGS (0x4); flags: (0x0); length: 36
>> stream 0 frame: SETTINGS (0x4); flags: (0x0); length: 36
<< stream 0 frame: SETTINGS (0x4); flags: ACK (0x1); length: 0
>> stream 0 frame: SETTINGS (0x4); flags: ACK (0x1); length: 0
<< :method: GET
<< :scheme: http
<< :authority: localhost:8080
<< :path: /Bulki.avi
<< user-agent: HttpCore-AB/5.0

<< stream 1 frame: HEADERS (0x1); flags: END_STREAM END_HEADERS (0x5); length: 
37
>> stream 1 frame: HEADERS (0x1); flags: END_HEADERS (0x4); length: 84
>> :status: 200
>> date: Mon, 17 Sep 2018 19:49:50 GMT
>> server: Apache-HttpCore/5.0-beta4-SNAPSHOT (Java/1.8.0_121)
>> content-type: application/octet-stream

200
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 57343 -8192
>> stream 0: 57343 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 49151 -8192
>> stream 0: 49151 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 40959 -8192
>> stream 0: 40959 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 32767 -8192
>> stream 0: 32767 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 24575 -8192
<< stream 1 frame: WINDOW_UPDATE (0x8); flags: (0x0); length: 4
>> stream 1: 2147483647 2147459072
>> stream 0: 24575 -8192
<< stream 0 frame: WINDOW_UPDATE (0x8); flags: (0x0); length: 4
>> stream 0: 2147483647 2147459072

...

>> stream 0: 2103443456 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103435264 -8192
>> stream 0: 2103435264 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103427072 -8192
>> stream 0: 2103427072 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103418880 -8192
>> stream 0: 2103418880 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103410688 -8192
>> stream 0: 2103410688 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103402496 -8192
>> stream 0: 2103402496 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103394304 -8192
>> stream 0: 2103394304 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103386112 -8192
>> stream 0: 2103386112 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103377920 -8192
>> stream 0: 2103377920 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103369728 -8192
>> stream 0: 2103369728 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103361536 -8192
>> stream 0: 2103361536 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103353344 -8192
>> stream 0: 2103353344 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103345152 -8192
>> stream 0: 2103345152 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103336960 -8192
>> stream 0: 2103336960 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103328768 -8192
>> stream 0: 2103328768 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103320576 -8192
>> stream 0: 2103320576 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103312384 -8192
>> stream 0: 2103312384 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103304192 -8192
>> stream 0: 2103304192 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103296000 -8192
>> stream 0: 2103296000 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103287808 -8192
>> stream 0: 2103287808 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103279616 -8192
>> stream 0: 2103279616 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103271424 -8192
>> stream 0: 2103271424 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103263232 -8192
>> stream 0: 2103263232 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103255040 -8192
>> stream 0: 2103255040 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103246848 -8192
>> stream 0: 2103246848 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 8192
>> stream 1: 2103238656 -8192
>> stream 0: 2103238656 -8192
>> stream 1 frame: DATA (0x0); flags: (0x0); length: 6145
>> stream 1: 2103232511 -6145
>> stream 0: 2103232511 -6145
>> stream 1 frame: DATA (0x0); flags: END_STREAM (0x1); length: 0
...done

Server Software:                Apache-HttpCore/5.0-beta4-SNAPSHOT 
(Java/1.8.0_121)
Protocol version:               HTTP/2.0
Server Hostname:                localhost
Server Port:                    8080
Document Path:                  http://localhost:8080/Bulki.avi
Document Length:                44292096 bytes

Concurrency Level:              1
Time taken for tests:   0.605000 seconds
Complete requests:              1
Failed requests:                0
Kept alive:                             0
Total transferred:              44340915 bytes
Content transferred:    44292096 bytes
Requests per second:    1.65 [#/sec] (mean)
Time per request:               605.000 [ms] (mean)
Time per request:               605.000 [ms] (mean, across all concurrent 
requests)
Transfer rate:                  71,573.02 [Kbytes/sec] received
{noformat}

> Add support for Reactive Streams
> --------------------------------
>
>                 Key: HTTPCLIENT-1942
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async)
>    Affects Versions: 5.0 Beta1
>            Reporter: Ryan Schmitt
>            Priority: Major
>              Labels: stuck, volunteers-wanted
>             Fix For: Future
>
>         Attachments: client to server tput.jpeg, client to server window 
> scaling (bytes out).jpeg, server to client tput.jpeg
>
>
> It would be very helpful to me if the Apache client provided an 
> implementation of the [Reactive Streams|http://www.reactive-streams.org/] 
> spec, particularly as an implementation of the standard 
> [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar].
>  These interfaces are JDK6-compatible and have no other dependencies, but 
> they unlock interoperability with many other frameworks, such as RxJava.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to