osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis issue #2328: ARTEMIS-2095 - Typed Properties ThreadSafety


Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2328
  
    @michaelandrepearce I have done some experiments on it and I have noticed that the issue is the contention of the `state` field on `StampedLock` with the rest of the surrounding fields on the heap. Just using a `AtomicLongArray` of 32 elements (256 bytes) and using the 16th element to hold the state is enough to avoid any weird contention issues with multi-sockets setup. 
    The effects of such change is so evident that just using a single-socket CPU would already benefit by this change. 
    The point is that it is an extreme way to improve perf on this and I don't know if we've such high contention of TypedProperties to justify it...


---