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

Stephane Routhiau commented on HTTPCORE-390:
--------------------------------------------

The evolution on SessionRequestCallback (operation initiated(...)) is necessary 
under heavy load as the SessionRequestCallback completed(...) operation can be 
called before 
the SessionRequest has been stored as pending in the pool by 
AbstractNIOConnPool (we managed to see it...)

I did not find any other solution for de-synchro, so i think we have to wait 
for 5.0.

If this pool actually breaks total max limit and max limit per route guarantees 
(we did not manage to see it under heavy load of short requests, i did not test 
it specialy, just used existing junit), i agree it should be an alternate pool 
strategy and implementation choosen by the user.

Steph


> Lock-less connection pools
> --------------------------
>
>                 Key: HTTPCORE-390
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-390
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.3.2
>            Reporter: Stephane Routhiau
>              Labels: concurrency, performance
>             Fix For: 5.0
>
>         Attachments: AbstractNIOConnPool.java, ConcurrentLinkedQueue.java, 
> DefaultConnectingIOReactor.java, RouteSpecificPool.java, 
> SessionRequestCallback.java, contention on lease and release.png, 
> patch-performance nio pool.patch
>
>
> AbstractNIOConnPool use a ReentrantLock for lease and release connection.
> We have noticed important contention when we try to use hundreds of 
> connexions to the same host, the lock is to vast.
> I managed to rework a part of the code so there is no more use of a 
> ReentrantLock, but use of ConcurrentHashMap and so on.
> The unit tests are ok and the load tests we have made on the patch version 
> are about 40 % faster under heavy load
> Please find attached patch file againt http-nio 4.3.2 and the modified 
> sources files of http-nio 4.3.2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to