You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (Jira)" <ji...@apache.org> on 2021/01/28 09:07:00 UTC
[jira] [Updated] (IGNITE-14076) Exponential putAll performance
degradation in transactional cache
[ https://issues.apache.org/jira/browse/IGNITE-14076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-14076:
------------------------------------
Description:
{{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.
was:
{{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|
|40000|41|
|50000|64|
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)