Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nlm: use ConcurrentHashMap to store the locks
Though access to the lock storage serialized for the same file, the Multimap still throws ConcurrentModificationException. Use ConcurrentHashMap to store locks as it gives a better throughput: // Multimaps#synchronizedListMultimap Result "org.dcache.nfs.v4.nlm.SimpleLmBenchmark.benchmarkConcurrentLocking": 437057.460 ±(99.9%) 18574.458 ops/s [Average] (min, avg, max) = (372606.415, 437057.460, 467748.621), stdev = 24796.370 CI (99.9%): [418483.001, 455631.918] (assumes normal distribution) // ConcurrentHashMap Result "org.dcache.nfs.v4.nlm.SimpleLmBenchmark.benchmarkConcurrentLocking": 744594.337 ±(99.9%) 45860.571 ops/s [Average] (min, avg, max) = (592325.817, 744594.337, 847798.786), stdev = 61222.550 CI (99.9%): [698733.766, 790454.908] (assumes normal distribution) Fixes: #70 Acked-by: Paul Millar Target: master, 0.17 (cherry picked from commit 805c7b4) Signed-off-by: Tigran Mkrtchyan <[email protected]>
- Loading branch information