-
Task
-
Resolution: Done
-
Major
-
2.4
-
None
-
Medium
Identify and reduce/eliminate heavily contended locks, e.g.
NakReceiverWindow:
N threads will messages from the same receiver will hit the NRW (synchronization on NRW for inserts and removes). We can possibly replace the sorted hashmaps in NRW with their java.util.concurrent equivalents, so access is distributed across bucket (lock striping), reducing heavily contended locks. Also, replace ReentrantLock (e.g. used in add() and remove()) with the j.u.c.lock equivalent.
NAKACK:
Same as above: replace received_msgs with ConcurrentHashMap. Use equivalents from j.u.c.lock to replace the locks used.
Another big source of contention is that multiple threads with messsages from the same receiver will all add their message to the same NRW, then only one thread will remove them all and pass them up, causing the other threads to block (incurring context switches and possible processor cache flushes). When the delivery thread returns, all other threads wake up and all of them return after NRW.remove() returns null !
- is related to
-
JGRP-457 Optimization: make threads return immediately if NAKACK has another active thread for the same sender
-
- Resolved
-