[
https://issues.apache.org/jira/browse/IGNITE-4908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957227#comment-15957227
]
Alexander Menshikov commented on IGNITE-4908:
---------------------------------------------
May be Later I will look at our lock implementations. Right now I wrote
benchmark IgniteCache.lock(...) vs Ignite.reentrantLock(...). There are results:
//Ignite.reentrantLock(...)
Benchmark (create) (failoverSafe) (fair) Mode
Cnt Score Error Units
JmhCacheLocksBenchmark.testIgniteLocks true true true thrpt
10 873,775 ± 60,388 ops/s
JmhCacheLocksBenchmark.testIgniteLocks true true false thrpt
10 1177,804 ± 162,082 ops/s
JmhCacheLocksBenchmark.testIgniteLocks true false true thrpt
10 915,579 ± 42,631 ops/s
JmhCacheLocksBenchmark.testIgniteLocks true false false thrpt
10 1176,044 ± 108,950 ops/s
JmhCacheLocksBenchmark.testIgniteLocks false true true thrpt
10 926,890 ± 37,080 ops/s
JmhCacheLocksBenchmark.testIgniteLocks false true false thrpt
10 1195,663 ± 73,578 ops/s
JmhCacheLocksBenchmark.testIgniteLocks false false true thrpt
10 903,658 ± 78,483 ops/s
JmhCacheLocksBenchmark.testIgniteLocks false false false thrpt
10 1159,586 ± 81,717 ops/s
//IgniteCache.lock(...)
Benchmark Mode Cnt Score Error Units
JmhCacheLocksBenchmark.testCacheLocks thrpt 10 8076,522 ± 786,153 ops/s
Looks like IgniteCache.lock(...) faster than Ignite.reentrantLock(...) at ~8
times.
I will investigate the reason.
> Ignite.reentrantLock looks much slower than IgniteCache.lock.
> -------------------------------------------------------------
>
> Key: IGNITE-4908
> URL: https://issues.apache.org/jira/browse/IGNITE-4908
> Project: Ignite
> Issue Type: Improvement
> Components: data structures
> Affects Versions: 1.8
> Reporter: Andrew Mashenkov
> Assignee: Alexander Menshikov
> Fix For: 2.1
>
>
> We should make a benchmark and investigate this issue.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)