jira-importer opened a new issue, #886:
URL: https://github.com/apache/httpcomponents-core/issues/886

   **[Stephane 
Routhiau](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=srouthiau)**
 opened 
**[HTTPCORE-390](https://issues.apache.org/jira/browse/HTTPCORE-390?redirect=false)**
 and commented
   
   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
   
   
   ---
   
   **Affects:** 4.3.2
   
   **Attachments:**
   - 
[AbstractNIOConnPool.java](https://issues.apache.org/jira/secure/attachment/12667679/AbstractNIOConnPool.java)
 (_28.58 kB_)
   - 
[ConcurrentLinkedQueue.java](https://issues.apache.org/jira/secure/attachment/12667781/ConcurrentLinkedQueue.java)
 (_31.39 kB_)
   - [contention on lease and 
release.png](https://issues.apache.org/jira/secure/attachment/12667685/contention+on+lease+and+release.png)
 (_314.63 kB_)
   - 
[DefaultConnectingIOReactor.java](https://issues.apache.org/jira/secure/attachment/12667680/DefaultConnectingIOReactor.java)
 (_11.07 kB_)
   - [patch-performance nio 
pool.patch](https://issues.apache.org/jira/secure/attachment/12667682/patch-performance+nio+pool.patch)
 (_40.09 kB_)
   - 
[RouteSpecificPool.java](https://issues.apache.org/jira/secure/attachment/12667683/RouteSpecificPool.java)
 (_6.90 kB_)
   - 
[SessionRequestCallback.java](https://issues.apache.org/jira/secure/attachment/12667684/SessionRequestCallback.java)
 (_2.47 kB_)
   
   **Issue Links:**
   - [HTTPCLIENT-1809](https://issues.apache.org/jira/browse/HTTPCLIENT-1809) 
Thread contention in PoolingHttpClientConnectionManager
    (_**"is duplicated by"**_)
   
   **Remote Links:**
   - [GitHub Pull Request `#3`
   ](https://github.com/apache/httpcore/pull/3)
   
   0 votes, 5 watchers
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to