hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCORE-390) Lock-less connection pools
Date Wed, 17 Sep 2014 15:34:35 GMT

     [ https://issues.apache.org/jira/browse/HTTPCORE-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski updated HTTPCORE-390:
---------------------------------------
    Fix Version/s:     (was: 4.4-beta1)
                   5.0
          Summary: Lock-less connection pools  (was: Performance issue on AbstractNIOConnPool)

Stephane,
There are more problems with your patch. It breaks 4.x API compatibility by altering the SessionRequestCallback
interface. It also breaks total max limit and max limit per route guarantees. As much I would
like to see connection pool performance improved in its current form and shape your patch
cannot be included into the 4.4 branch. I think that a better approach should be developing
a completely new connection pool implementation that intentionally provides no max limit guarantees
but improves performance on multi-core systems by eliminating thread contention for one global
lock. Users would have an option to choose a connection pool strategy based on their preferences
and requirements.

If you are willing to invest more time into this work please do let me know. Otherwise it
will have to wait until 5.0.

Oleg

> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message