[concurrency-interest] Re : Re : concurrent counter : incrementAndGet
nathan.reynolds at oracle.com
Wed Aug 24 18:34:32 EDT 2011
David Dice's Weblog has some interesting information on this and
confirms LOCK XADD will perform better.
There is a HotSpot bug for this as well.
Consulting Member of Technical Staff | 602.333.9091
Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology
On 8/24/2011 2:45 PM, Michael Barker wrote:
>>> (This seems to be the main bottleneck in Disruptor-like designs.)
>> Yes, that's why I started to focus on it. I think it's the only part of
>> this disruptor
>> that is potentially proportionnal-or-worse to the number of threads (one
>> could think
>> of ring buffer scanning by consumers too, but it should be possible to use
>> modulo so that each entry doesn't get scanned by all consumers).
> Yup, the counter is the significant point of contention in the
> disruptor design. However strict ordering was one of the key design
> goals. Annoyingly, atomic increment with Hotspot on Intel is
> implemented LOCK CMPXCHG, we think a significant performance boost
> would come from using a LOCK XADD instead.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest