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

Bernd Eckenfels updated POOL-277:
---------------------------------
    Attachment: nonlockstats.diff

How is this? This does move the maximum calculation to the StatsStore and makes 
the stats store lockfree. This requires a power-of-two (128 instead of 100) 
history size to be effficient. The maximum is now also calculated for idle and 
active times (but not exported). I think this fixes some other things like 
concurrent index use as well. It should also be a bit more memory conserving 
(AtomicLongArray instead of Array of AtomicLongs).

Lucas, could you test this, especially with looking if it improves 
StatsStore.add() in your tests as well?

BTW: i think the mean is calculated wrong, there is a TODO in the patch.

> Monitor contention at BaseGenericObjectPool
> -------------------------------------------
>
>                 Key: POOL-277
>                 URL: https://issues.apache.org/jira/browse/POOL-277
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Lucas Pouzac
>              Labels: concurrency, performance
>             Fix For: 2.3
>
>         Attachments: monitor_contention_basegenericobjectpool.png, 
> monitor_contention_basegenericobjectpool_after_pull_request.png, 
> nonlockstats.diff
>
>
> Updating JMX causes synchronization while the service is secondary. See 
> screenshot.
> I create a Pull Request [#1|https://github.com/apache/commons-pool/pull/1].



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

Reply via email to