[
https://issues.apache.org/jira/browse/IGNITE-14076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn reassigned IGNITE-14076:
---------------------------------------
Assignee: (was: Pavel Tupitsyn)
> Exponential putAll performance degradation in transactional cache
> -----------------------------------------------------------------
>
> Key: IGNITE-14076
> URL: https://issues.apache.org/jira/browse/IGNITE-14076
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 2.9.1
> Reporter: Pavel Tupitsyn
> Priority: Critical
> Fix For: 2.11
>
>
> {{putAll}} execution time grows almost exponentially while the number of keys
> grows linearly in the following test:
> {code:java}
> public class PutAllTxTest extends GridCommonAbstractTest {
> @Test
> public void testPutAll() throws Exception {
> Ignition.start(getConfiguration("server1"));
> Ignition.start(getConfiguration("server2"));
> Ignite ignite =
> Ignition.start(getConfiguration("client").setClientMode(true));
> IgniteCache<Integer, Integer> cache = ignite.createCache(
> new CacheConfiguration<Integer, Integer>("c")
> .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
> int count = 50000;
> Map<Integer, Integer> data = new TreeMap<>();
> for (int i = 0; i < count; i++)
> data.put(i, i);
> long begin = System.nanoTime();
> cache.putAll(data);
> long dur = System.nanoTime() - begin;
> System.out.println(">>>>> " + dur / 1000000);
> }
> }
> {code}
> ||Entries||Seconds||
> |1000|0.4|
> |5000|1.9|
> |10000|3.8|
> |20000|10.7|
> |30000|23.5|
> |40000|41|
> |50000|64|
> |60000|90|
> |100000|254|
> This does not reproduce with 1 server node, and does not reproduce on
> {{ATOMIC}} caches with any number of nodes.
> *Observations:*
> - Not a GC issue (it barely runs)
> - Not a memory issue (heap is under 1GB)
> - GridDhtTxPrepareFuture#localDhtPendingVersions ->
> GridCacheMapEntry.localCandidates is the bottleneck. For 1K keys,
> localCandidates gets called 123K times, 2K keys - 484K times, etc.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)