1093
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f2da44dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f2da44dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f2da44dc Branch: refs/heads/ignite-1093-2 Commit: f2da44dcfbadb8b5192536557151a04a18ee098a Parents: e22267b Author: Anton Vinogradov <[email protected]> Authored: Fri Oct 9 17:44:15 2015 +0300 Committer: Anton Vinogradov <[email protected]> Committed: Fri Oct 9 17:44:15 2015 +0300 ---------------------------------------------------------------------- .../distributed/dht/GridDhtLocalPartition.java | 60 ++++++--- .../distributed/dht/GridDhtPartitionState.java | 3 + .../dht/GridDhtPartitionTopologyImpl.java | 3 +- .../dht/preloader/GridDhtPartitionDemander.java | 16 +-- .../dht/preloader/GridDhtPartitionSupplier.java | 20 ++- .../dht/preloader/GridDhtPreloader.java | 14 +- .../GridCacheRebalancingSyncSelfTest.java | 61 +++++++++ .../config/benchmark-rebalancing.properties | 21 +-- .../ignite-rebalancing-multicast-config.xml | 134 +++++++------------ 9 files changed, 192 insertions(+), 140 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java index 2deabfe..aac32b0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java @@ -17,6 +17,17 @@ package org.apache.ignite.internal.processors.cache.distributed.dht; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.AtomicStampedReference; +import java.util.concurrent.locks.ReentrantLock; +import javax.cache.CacheException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.IgniteInternalFuture; @@ -46,21 +57,10 @@ import org.jetbrains.annotations.NotNull; import org.jsr166.ConcurrentHashMap8; import org.jsr166.LongAdder8; -import javax.cache.CacheException; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.atomic.AtomicStampedReference; -import java.util.concurrent.locks.ReentrantLock; - import static org.apache.ignite.IgniteSystemProperties.IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE; import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_OBJECT_UNLOADED; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTED; +import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.RENTING; @@ -69,6 +69,9 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDh * Key partition. */ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, GridReservable { + /** Maximum entries to be cleared at eviction attempt at once. */ + private final static long EVICTION_CLEAR_LIMIT = 1000; + /** Maximum size for delete queue. */ public static final int MAX_DELETE_QUEUE_SIZE = Integer.getInteger(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, 200_000); @@ -426,7 +429,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, GridDhtPartitionState s = state.getReference(); - if (s == RENTING || s == EVICTED) + if (s == RENTING || s == EVICTING || s == EVICTED) return false; if (s == OWNING) @@ -456,7 +459,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, GridDhtPartitionState s = state.getReference(); - if (s == RENTING || s == EVICTED) + if (s == RENTING || s == EVICTING || s == EVICTED) return rent; if (state.compareAndSet(s, RENTING, reservations, reservations)) { @@ -524,13 +527,25 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, * @return {@code True} if entry has been transitioned to state EVICTED. */ boolean tryEvict(boolean updateSeq) { - if (state.getReference() != RENTING || state.getStamp() != 0 || groupReserved()) + if ((state.getReference() != RENTING && state.getReference() != EVICTING) || + state.getStamp() != 0 || groupReserved()) + return false; + + if (!state.compareAndSet(RENTING, EVICTING, 0, 0)) return false; // Attempt to evict partition entries from cache. - clearAll(); + if (!clearAll(EVICTION_CLEAR_LIMIT)){ //Resend to pool to stop another threads blocking. + cctx.closures().callLocalSafe(new GPC<Boolean>() { + @Override public Boolean call() { + return tryEvict(true); + } + }, /*system pool*/ true); + + return false; + } - if (map.isEmpty() && state.compareAndSet(RENTING, EVICTED, 0, 0)) { + if (map.isEmpty() && state.compareAndSet(EVICTING, EVICTED, 0, 0)) { if (log.isDebugEnabled()) log.debug("Evicted partition: " + this); @@ -604,8 +619,10 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, /** * Clears values for this partition. + * @param limit Clear limit. + * @return */ - private void clearAll() { + private boolean clearAll(long limit) { GridCacheVersion clearVer = cctx.versions().next(); boolean swap = cctx.isSwapOrOffheapEnabled(); @@ -631,8 +648,13 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, it = F.concat(it, unswapIt); } + long cnt = 0; + try { while (it.hasNext()) { + if (limit > 0 && cnt++ > limit) + return false; + GridDhtCacheEntry cached = null; try { @@ -676,6 +698,8 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, finally { U.close(swapIt, log); } + + return true; } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionState.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionState.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionState.java index 7b49369..4f6d59d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionState.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionState.java @@ -32,6 +32,9 @@ public enum GridDhtPartitionState { /** This node is neither primary or back up owner. */ RENTING, + /** Partition eviction from cache in progress. */ + EVICTING, + /** Partition has been evicted from cache. */ EVICTED; http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java index a0c9c88..bbddbb5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java @@ -53,6 +53,7 @@ import org.jsr166.ConcurrentHashMap8; import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTED; +import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.OWNING; import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.RENTING; @@ -169,7 +170,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { GridDhtPartitionState state = p.state(); - if (state == RENTING || state == EVICTED) { + if (state == RENTING || state == EVICTING || state == EVICTED) { if (log.isDebugEnabled()) log.debug("Waiting for renting partition: " + p); http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java index e743765..4e274f3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Callable; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -71,7 +72,6 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteUuid; -import org.apache.ignite.thread.IgniteThread; import org.jetbrains.annotations.Nullable; import static java.util.concurrent.TimeUnit.MILLISECONDS; @@ -294,8 +294,8 @@ public class GridDhtPartitionDemander { return; } - IgniteThread thread = new IgniteThread(cctx.gridName(), "demand-thread-" + cctx.cache().name(), new Runnable() { - @Override public void run() { + cctx.closures().callLocalSafe(new Callable<Boolean>() { + @Override public Boolean call() { if (!CU.isMarshallerCache(cctx.name())) { waitForCacheRebalancing(GridCacheUtils.MARSH_CACHE_NAME, fut); @@ -320,7 +320,7 @@ public class GridDhtPartitionDemander { else { fut.cancel(); - return; + return false; } } } @@ -330,7 +330,7 @@ public class GridDhtPartitionDemander { "[cacheName=" + cctx.name() + ", rebalanceOrder=" + rebalanceOrder + ']'); fut.cancel(); - return; + return false; } } catch (IgniteCheckedException e) { @@ -341,10 +341,10 @@ public class GridDhtPartitionDemander { } requestPartitions(fut, assigns); + + return true; } }); - - thread.start(); } else if (delay > 0) { GridTimeoutObject obj = lastTimeoutObj.get(); @@ -444,7 +444,7 @@ public class GridDhtPartitionDemander { } } else { - U.log(log, "Starting rebalancing [cache=" + cctx.name() + ", mode=" + cfg.getRebalanceMode() + + U.log(log, "Starting rebalancing (old api) [cache=" + cctx.name() + ", mode=" + cfg.getRebalanceMode() + ", fromNode=" + node.id() + ", partitionsCount=" + d.partitions().size() + ", topology=" + d.topologyVersion() + ", updateSeq=" + d.updateSequence() + "]"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java index cd4b111..8206b93 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java @@ -224,6 +224,13 @@ class GridDhtPartitionSupplier { maxBatchesCnt = 1; } + else { + if (log.isDebugEnabled()) + log.debug("Starting supplying rebalancing [cache=" + cctx.name() + + ", fromNode=" + node.id() + ", partitionsCount=" + d.partitions().size() + + ", topology=" + d.topologyVersion() + ", updateSeq=" + d.updateSequence() + + ", idx=" + idx + "]"); + } Iterator<Integer> partIt = sctx != null ? sctx.partIt : d.partitions().iterator(); @@ -556,6 +563,12 @@ class GridDhtPartitionSupplier { scMap.remove(scId); reply(node, d, s, scId); + + if (log.isDebugEnabled()) + log.debug("Finished supplying rebalancing [cache=" + cctx.name() + + ", fromNode=" + node.id() + + ", topology=" + d.topologyVersion() + ", updateSeq=" + d.updateSequence() + + ", idx=" + idx + "]"); } catch (IgniteCheckedException e) { U.error(log, "Failed to send partition supply message to node: " + id, e); @@ -579,13 +592,6 @@ class GridDhtPartitionSupplier { if (log.isDebugEnabled()) log.debug("Replying to partition demand [node=" + n.id() + ", demand=" + d + ", supply=" + s + ']'); - if (!cctx.affinity().affinityTopologyVersion().equals(d.topologyVersion()) || // Topology already changed. - cctx.shared().exchange().hasPendingExchange()) { // New topology pending. - clearContext(scMap.remove(scId), log); - - return false; - } - cctx.io().sendOrderedMessage(n, d.topic(), s, cctx.ioPolicy(), d.timeout()); // Throttle preloading. http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java index bdaaefd..06f4522 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java @@ -313,7 +313,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter { log.debug("Owning partition as there are no other owners: " + part); } else { - ClusterNode n = F.first(picked); + ClusterNode n = F.rand(picked); GridDhtPartitionDemandMessage msg = assigns.get(n); @@ -396,15 +396,9 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter { } /** {@inheritDoc} */ - @Override public void addAssignments(GridDhtPreloaderAssignments assignments, boolean forcePreload) throws IgniteCheckedException { - demandLock.writeLock().lock(); - - try { - demander.addAssignments(assignments, forcePreload); - } - finally { - demandLock.writeLock().unlock(); - } + @Override public void addAssignments(GridDhtPreloaderAssignments assignments, + boolean forcePreload) throws IgniteCheckedException { + demander.addAssignments(assignments, forcePreload); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java index b3cf0cb..028a8fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java @@ -103,6 +103,7 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { cacheRCfg.setRebalanceMode(CacheRebalanceMode.SYNC); cacheRCfg.setRebalanceBatchSize(1); cacheRCfg.setRebalanceBatchesCount(Integer.MAX_VALUE); + cacheRCfg.setRebalanceDelay(5000); CacheConfiguration<Integer, Integer> cacheRCfg2 = new CacheConfiguration<>(); @@ -209,6 +210,66 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { } /** + * @throws Exception Exception + */ + public void testLoadRebalancing() throws Exception { + final Ignite ignite = startGrid(0); + + startGrid(1); + + generateData(ignite, CACHE_NAME_DHT_PARTITIONED, 0, 0); + + log.info("Preloading started."); + + long start = System.currentTimeMillis(); + + concurrentStartFinished = false; + + Thread t1 = new Thread() { + @Override public void run() { + while (!concurrentStartFinished) { + for (int i = 0; i < 0 + TEST_SIZE; i++) { + if (i % (TEST_SIZE / 10) == 0) + log.info("Prepared " + i * 100 / (TEST_SIZE) + "% entries (" + TEST_SIZE + ")."); + + ignite.cache(CACHE_NAME_DHT_PARTITIONED).put(i, i + CACHE_NAME_DHT_PARTITIONED.hashCode() + 0); + } + } + } + }; + Thread t2 = new Thread() { + @Override public void run() { + while (!concurrentStartFinished) { + try { + checkData(ignite, CACHE_NAME_DHT_PARTITIONED, 0, 0); + } + catch (IgniteCheckedException e) { + e.printStackTrace(); + } + } + } + }; + + t1.start(); + t2.start(); + + startGrid(2); + + waitForRebalancing(2, 3); + + concurrentStartFinished = true; + + t1.join(); + t2.join(); + + long spend = (System.currentTimeMillis() - start) / 1000; + + log.info("Spend " + spend + " seconds to rebalance entries."); + + stopAllGrids(); + } + + /** * @param id Node id. * @param major Major ver. * @param minor Minor ver. http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/yardstick/config/benchmark-rebalancing.properties ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/benchmark-rebalancing.properties b/modules/yardstick/config/benchmark-rebalancing.properties index ae9cfb5..796e49f 100644 --- a/modules/yardstick/config/benchmark-rebalancing.properties +++ b/modules/yardstick/config/benchmark-rebalancing.properties @@ -28,6 +28,7 @@ JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false -Xms15g -Xmx15g" JVM_OPTS=${JVM_OPTS}" \ -Xloggc:./gc${now0}.log \ -XX:+PrintGCDetails \ + -XX:+PrintGCDateStamps \ -verbose:gc \ -XX:+UseParNewGC \ -XX:+UseConcMarkSweepGC \ @@ -38,8 +39,8 @@ JVM_OPTS=${JVM_OPTS}" \ -XX:MaxTenuringThreshold=0 \ -XX:SurvivorRatio=1024 \ -XX:+UseCMSInitiatingOccupancyOnly \ - -XX:CMSInitiatingOccupancyFraction=60 \ - -XX:+DisableExplicitGC \ + -XX:CMSInitiatingOccupancyFraction=40 \ + -XX:MaxGCPauseMillis=100 \ " # List of default probes. @@ -68,11 +69,13 @@ nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} # Run configuration. CONFIGS="\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet1 -cl -r 20000000 -cn rebalance1,\ -cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet2 -cl -r 20000000 -cn rebalance2,\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3 -cl -r 20000000 -cn rebalance3,\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet5 -cl -r 20000000 -cn rebalance5,\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-1024 -cl -r 20000000 -cn rebalance3-1024,\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-10024 -cl -r 20000000 -cn rebalance3-10024,\ --cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-100024 -cl -r 20000000 -cn rebalance3-100024,\ -" \ No newline at end of file +" +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet1 -cl -r 20000000 -cn rebalance1,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet2 -cl -r 20000000 -cn rebalance2,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3 -cl -r 20000000 -cn rebalance3,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet5 -cl -r 20000000 -cn rebalance5,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-1024 -cl -r 20000000 -cn rebalance3-1024,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-10024 -cl -r 20000000 -cn rebalance3-10024,\ +#-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 140 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet3-100024 -cl -r 20000000 -cn rebalance3-100024,\ +#" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/f2da44dc/modules/yardstick/config/ignite-rebalancing-multicast-config.xml ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/ignite-rebalancing-multicast-config.xml b/modules/yardstick/config/ignite-rebalancing-multicast-config.xml index 0881387..667c148 100644 --- a/modules/yardstick/config/ignite-rebalancing-multicast-config.xml +++ b/modules/yardstick/config/ignite-rebalancing-multicast-config.xml @@ -22,10 +22,7 @@ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> <property name="gridLogger"> <bean class="org.apache.ignite.logger.log4j.Log4JLogger"> @@ -47,115 +44,68 @@ </property> </bean> </property> + + <!--<property name="forceServerMode" value="true"/>--> </bean> </property> <property name="cacheConfiguration"> <list> - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance1"/> - - <property name="cacheMode" value="PARTITIONED"/> - - <property name="atomicityMode" value="ATOMIC"/> - - <property name="swapEnabled" value="false"/> - - <property name="backups" value="1"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance1"/>--> - <property name="rebalanceBatchesCount" value="1"/> - </bean> + <!--<property name="rebalanceBatchesCount" value="1"/>--> + <!--</bean>--> - <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <bean parent="cacheParent"> <property name="name" value="rebalance2"/> - <property name="cacheMode" value="PARTITIONED"/> - - <property name="atomicityMode" value="ATOMIC"/> - - <property name="swapEnabled" value="false"/> - - <property name="backups" value="1"/> - <property name="rebalanceBatchesCount" value="2"/> </bean> - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance3"/> - - <property name="cacheMode" value="PARTITIONED"/> - - <property name="atomicityMode" value="ATOMIC"/> - - <property name="swapEnabled" value="false"/> - - <property name="backups" value="1"/> - - <property name="rebalanceBatchesCount" value="3"/> - </bean> - - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance5"/> - - <property name="cacheMode" value="PARTITIONED"/> - - <property name="atomicityMode" value="ATOMIC"/> - - <property name="swapEnabled" value="false"/> - - <property name="backups" value="1"/> - - <property name="rebalanceBatchesCount" value="5"/> - </bean> - - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance3-1024"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance2-d"/>--> - <property name="cacheMode" value="PARTITIONED"/> + <!--<property name="rebalanceBatchesCount" value="2"/>--> - <property name="atomicityMode" value="ATOMIC"/> + <!--<property name="rebalanceDelay" value="20000"/>--> + <!--</bean>--> - <property name="swapEnabled" value="false"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance3"/>--> - <property name="backups" value="1"/> + <!--<property name="rebalanceBatchesCount" value="3"/>--> + <!--</bean>--> - <property name="rebalanceBatchesCount" value="3"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance5"/>--> - <property name="rebalanceBatchSize" value="1024"/> - </bean> - - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance3-10024"/> - - <property name="cacheMode" value="PARTITIONED"/> + <!--<property name="rebalanceBatchesCount" value="5"/>--> + <!--</bean>--> - <property name="atomicityMode" value="ATOMIC"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance3-1024"/>--> - <property name="swapEnabled" value="false"/> + <!--<property name="rebalanceBatchesCount" value="3"/>--> - <property name="backups" value="1"/> + <!--<property name="rebalanceBatchSize" value="1024"/>--> + <!--</bean>--> - <property name="rebalanceBatchesCount" value="3"/> - - <property name="rebalanceBatchSize" value="10024"/> - </bean> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance3-10024"/>--> - <bean class="org.apache.ignite.configuration.CacheConfiguration"> - <property name="name" value="rebalance3-100024"/> + <!--<property name="rebalanceBatchesCount" value="3"/>--> - <property name="cacheMode" value="PARTITIONED"/> + <!--<property name="rebalanceBatchSize" value="10024"/>--> + <!--</bean>--> - <property name="atomicityMode" value="ATOMIC"/> + <!--<bean parent="cacheParent">--> + <!--<property name="name" value="rebalance3-100024"/>--> - <property name="swapEnabled" value="false"/> - - <property name="backups" value="1"/> - - <property name="rebalanceBatchesCount" value="3"/> - - <property name="rebalanceBatchSize" value="100024"/> - </bean> + <!--<property name="rebalanceBatchesCount" value="3"/>--> + <!--<property name="rebalanceBatchSize" value="100024"/>--> + <!--</bean>--> </list> </property> @@ -165,10 +115,20 @@ <property name="warmupClosure" ref="warmupClosure"/> - <property name="rebalanceThreadPoolSize" value="8"/> + <property name="rebalanceThreadPoolSize" value="2"/> </bean> <bean id="warmupClosure" class="org.apache.ignite.startup.BasicWarmupClosure"> </bean> + + <bean id="cacheParent" class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="cacheMode" value="PARTITIONED"/> + + <property name="atomicityMode" value="ATOMIC"/> + + <property name="swapEnabled" value="false"/> + + <property name="backups" value="1"/> + </bean> </beans>
