[ https://issues.apache.org/jira/browse/IGNITE-21379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17817309#comment-17817309 ]
Vladislav Pyatkov commented on IGNITE-21379: -------------------------------------------- I compare two general approaches: based on IgniteSpinReadWriteLock and based on ReentrantReadWriteLock. The comparison runs in the dedicated test: |RW lock test|406| |Busy lock test|296| |RW try lock test|358| |Counter test|200| This is a latency of 1000 operations in millis. One operation contains two read lock and two read unlock operations. There are the same results, but in multi-threaded environments: |RW lock test|2 135| |Busy lock test|2 377| |RW try lock test|2 088| |Counter test|1 476| One operation acquires a lock in one thread, then takes a lock and releases it in another one, finally returning to the original thread and releasing the first read lock. Also, I implement IgniteSpinBusyLock based on RW. I ran a load, and this implementation does not show a significant performance impact. > Investigate whether currently used busyLocks implementation is fast enough > -------------------------------------------------------------------------- > > Key: IGNITE-21379 > URL: https://issues.apache.org/jira/browse/IGNITE-21379 > Project: Ignite > Issue Type: Improvement > Reporter: Alexander Lapin > Assignee: Vladislav Pyatkov > Priority: Major > Labels: ignite-3, performance > > h3. Motivation > Seems that our busyLocks (IgniteSpinBusyLock) aren't good enough from the > performance perspective. Let's compare current implementation with common RW > locks, CheckpointReadWriteLock, etc. Depending on the results it'll be > required either to use faster implementation or re-consider busyLock idea > itself because currently it brings significant performance drop. Given ticket > is only about initial step - busyLock performance investigation. > h3. Definition of Done > * Prepare JMH benchmarks for busyLocks performance investigation. > * Compare IgniteSpinBusyLock, common RW lock, CheckpointReadWriteLock, etc > in order to understand whether IgniteSpinBusyLock is fast enough. -- This message was sent by Atlassian Jira (v8.20.10#820010)