[concurrency-interest] Re : Re : concurrent counter : incrementAndGet

Michael Barker mikeb01 at gmail.com
Wed Aug 24 17:45:45 EDT 2011

>>(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.


More information about the Concurrency-interest mailing list