You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Stanilovsky Evgeny (Jira)" <ji...@apache.org> on 2021/03/16 14:53:00 UTC
[jira] [Updated] (IGNITE-14076) Quadratic putAll performance
degradation in transactional cache
[ https://issues.apache.org/jira/browse/IGNITE-14076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stanilovsky Evgeny updated IGNITE-14076:
----------------------------------------
Issue Type: Improvement (was: Bug)
> Quadratic putAll performance degradation in transactional cache
> ---------------------------------------------------------------
>
> Key: IGNITE-14076
> URL: https://issues.apache.org/jira/browse/IGNITE-14076
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: 2.9.1
> Reporter: Pavel Tupitsyn
> Assignee: Stanilovsky Evgeny
> Priority: Critical
> Fix For: 2.11
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{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)