You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/06/02 15:10:05 UTC

[jira] [Commented] (IGNITE-5293) Replicated cache performance degradation.

    [ https://issues.apache.org/jira/browse/IGNITE-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16034837#comment-16034837 ] 

ASF GitHub Bot commented on IGNITE-5293:
----------------------------------------

GitHub user yzhdanov opened a pull request:

    https://github.com/apache/ignite/pull/2070

    Replicated optimizations

    https://issues.apache.org/jira/browse/IGNITE-5293

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yzhdanov/ignite replicated-optimizations

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/2070.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2070
    
----
commit 87708161edac26caa6b6cad0c41fbf40e09aac00
Author: Yakov Zhdanov <yz...@gridgain.com>
Date:   2017-06-01T17:01:58Z

    Fixed DiscoverySpi methods return types.

commit 87a79f1fd4c59ba7eb4deba7a83a0b88f50a03f5
Author: Yakov Zhdanov <yz...@gridgain.com>
Date:   2017-06-01T17:15:51Z

    wip

commit dd1310f664194d9948eac5a6483e71163821746a
Author: Yakov Zhdanov <yz...@gridgain.com>
Date:   2017-06-02T14:27:05Z

    wip

----


> Replicated cache performance degradation.
> -----------------------------------------
>
>                 Key: IGNITE-5293
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5293
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.0
>            Reporter: Alexei Scherbakov
>             Fix For: 2.2
>
>
> With increase in number of nodes puts to replicated cache are slowed down almost in the same proportion.
> Unit test reproducer:
> {noformat}
> /*
>  * Licensed to the Apache Software Foundation (ASF) under one or more
>  * contributor license agreements.  See the NOTICE file distributed with
>  * this work for additional information regarding copyright ownership.
>  * The ASF licenses this file to You under the Apache License, Version 2.0
>  * (the "License"); you may not use this file except in compliance with
>  * the License.  You may obtain a copy of the License at
>  *
>  *      http://www.apache.org/licenses/LICENSE-2.0
>  *
>  * Unless required by applicable law or agreed to in writing, software
>  * distributed under the License is distributed on an "AS IS" BASIS,
>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>  * See the License for the specific language governing permissions and
>  * limitations under the License.
>  */
> package org.apache.ignite.internal.processors.cache.distributed.replicated;
> import org.apache.ignite.Ignite;
> import org.apache.ignite.IgniteCache;
> import org.apache.ignite.cache.CacheAtomicityMode;
> import org.apache.ignite.cache.CacheMode;
> import org.apache.ignite.cache.CacheWriteSynchronizationMode;
> import org.apache.ignite.configuration.CacheConfiguration;
> import org.apache.ignite.configuration.IgniteConfiguration;
> import org.apache.ignite.configuration.MemoryConfiguration;
> import org.apache.ignite.internal.IgniteEx;
> import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
> import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
> import org.apache.ignite.transactions.Transaction;
> import org.apache.ignite.transactions.TransactionConcurrency;
> import org.apache.ignite.transactions.TransactionIsolation;
> /**
>  * Tests replicated cache performance .
>  */
> public class GridCacheReplicatedTransactionalDegradationTest extends GridCommonAbstractTest {
>     /** Keys. */
>     private static final int KEYS = 100_000;
>     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
>         IgniteConfiguration cfg = super.getConfiguration(gridName);
>         cfg.setClientMode(gridName.startsWith("client"));
>         CacheConfiguration ccfg = new CacheConfiguration();
>         ccfg.setCacheMode(CacheMode.REPLICATED);
>         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
>         ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
>         ccfg.setName("test");
>         cfg.setCacheConfiguration(ccfg);
>         return cfg;
>     }
>     /** */
>     public void testThroughput() throws Exception {
>         try {
>             IgniteEx grid0 = startGrid(0);
>             Ignite client = startGrid("client");
>             IgniteCache<Object, Object> cache = client.getOrCreateCache("test");
>             doTest(client, cache);
>             startGrid(1);
>             doTest(client, cache);
>             startGrid(2);
>             doTest(client, cache);
>         } finally {
>             stopAllGrids();
>         }
>     }
>     /**
>      * @param client
>      * @param cache Cache.
>      */
>     private void doTest(Ignite client, IgniteCache<Object, Object> cache) {
>         long t1 = System.currentTimeMillis();
>         for (int i = 0; i < KEYS; i++) {
>             try (Transaction tx = client.transactions().txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) {
>                 cache.put(i, i);
>                 tx.commit();
>             }
>         }
>         log.info("TPS: " + Math.round(KEYS / (float)(System.currentTimeMillis() - t1) * 1000));
>     }
> }
> {noformat}
> My test results are:
> 1. transactional cache, explicit transaction.
> TPS: 2507
> TPS: 1660
> TPS: 1148
> 2. atomic cache
> TPS: 6416
> TPS: 5177
> TPS: 4403
> 3. transactional cache, no explicit transaction
> TPS: 4485
> TPS: 2289
> TPS: 1439



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)