Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2B5718F9C for ; Fri, 28 Aug 2015 16:00:42 +0000 (UTC) Received: (qmail 57976 invoked by uid 500); 28 Aug 2015 16:00:42 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 57944 invoked by uid 500); 28 Aug 2015 16:00:42 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 57935 invoked by uid 99); 28 Aug 2015 16:00:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2015 16:00:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4EE21E08EF; Fri, 28 Aug 2015 16:00:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Message-Id: <82ffaafb29ce49c38a665f03e387d5fb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: ignite-1093 Date: Fri, 28 Aug 2015 16:00:42 +0000 (UTC) Repository: ignite Updated Branches: refs/heads/ignite-1093 5d2e2892d -> 9750ef6f4 ignite-1093 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9750ef6f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9750ef6f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9750ef6f Branch: refs/heads/ignite-1093 Commit: 9750ef6f45bafb1f13edceb5cd13e526d66832e4 Parents: 5d2e289 Author: Anton Vinogradov Authored: Fri Aug 28 19:00:10 2015 +0300 Committer: Anton Vinogradov Committed: Fri Aug 28 19:00:10 2015 +0300 ---------------------------------------------------------------------- .../config/benchmark-rebalancing-win.properties | 60 +++++++ .../config/benchmark-rebalancing.properties | 79 +++++++++ modules/yardstick/config/ignite-log4j.xml | 143 +++++++++++++++ .../ignite-rebalancing-multicast-config.xml | 174 +++++++++++++++++++ .../ignite-rebalancing-multicast-win-config.xml | 70 ++++++++ modules/yardstick/pom.xml | 8 +- .../yardstick/IgniteBenchmarkArguments.java | 13 +- .../cache/IgniteCacheAbstractBenchmark.java | 5 +- .../IgniteRebalancePutGetBenchmark.java | 72 ++++++++ 9 files changed, 621 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/config/benchmark-rebalancing-win.properties ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/benchmark-rebalancing-win.properties b/modules/yardstick/config/benchmark-rebalancing-win.properties new file mode 100644 index 0000000..978e388 --- /dev/null +++ b/modules/yardstick/config/benchmark-rebalancing-win.properties @@ -0,0 +1,60 @@ +# +# 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. +# + +:: +:: Contains benchmarks for ATOMIC cache. +:: + +:: JVM options. +set JVM_OPTS=%JVM_OPTS% -DIGNITE_QUIET=false + +:: Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses. +:: set JVM_OPTS=%JVM_OPTS%^ +:: -XX:+UseParNewGC^ +:: -XX:+UseConcMarkSweepGC^ +:: -XX:+UseTLAB^ +:: -XX:NewSize=128m^ +:: -XX:MaxNewSize=128m^ +:: -XX:MaxTenuringThreshold=0^ +:: -XX:SurvivorRatio=1024^ +:: -XX:+UseCMSInitiatingOccupancyOnly^ +:: -XX:CMSInitiatingOccupancyFraction=60 + +:: List of default probes. +BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe + +:: Packages where the specified benchmark is searched by reflection mechanism. +BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick + +:: Probe point writer class name. +:: BENCHMARK_WRITER= + +:: Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default. +set SERVER_HOSTS=localhost + +:: Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default. +set DRIVER_HOSTS=localhost + +:: Remote username. +:: set REMOTE_USER= +:: set RESTART_SERVERS=localhost:10:100 + +:: Run configuration which contains all benchmarks. +:: Note that each benchmark is set to run for 300 seconds (5 mins) with warm-up set to 60 seconds (1 minute). + +set CONFIGS=^ +-cfg %SCRIPT_DIR%\..\config\ignite-rebalancing-multicast-win-config.xml -b 1 -w 0 -d 200 -t 64 -sm PRIMARY_SYNC -dn IgniteRebalancePutGetBenchmark -sn IgniteNode -ds PutGet2 -cl -r 5000000 -cn rebalance2 http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/config/benchmark-rebalancing.properties ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/benchmark-rebalancing.properties b/modules/yardstick/config/benchmark-rebalancing.properties new file mode 100644 index 0000000..f6d6967 --- /dev/null +++ b/modules/yardstick/config/benchmark-rebalancing.properties @@ -0,0 +1,79 @@ +# +# 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. +# + +# +# Contains benchmarks for ATOMIC cache. +# + +now0=`date +'%H%M%S'` + +# JVM options. +JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false -Xms15g -Xmx15g" + +# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses. +JVM_OPTS=${JVM_OPTS}" \ + -Xloggc:./gc${now0}.log \ + -XX:+PrintGCDetails \ + -verbose:gc \ + -XX:+UseParNewGC \ + -XX:+UseConcMarkSweepGC \ + -XX:+UseTLAB \ + -XX:NewSize=128m \ + -XX:MaxNewSize=128m \ + -XX:MaxPermSize=512m \ + -XX:MaxTenuringThreshold=0 \ + -XX:SurvivorRatio=1024 \ + -XX:+UseCMSInitiatingOccupancyOnly \ + -XX:CMSInitiatingOccupancyFraction=60 \ + -XX:+DisableExplicitGC \ +" + +# List of default probes. +# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux). +BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,VmStatProbe,DStatProbe + +# Packages where the specified benchmark is searched by reflection mechanism. +BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick + +# Probe point writer class name. +# BENCHMARK_WRITER= + +# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default. +SERVER_HOSTS=10.20.0.221,10.20.0.222,10.20.0.223 + +# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default. +DRIVER_HOSTS=localhost + +RESTART_SERVERS=10.20.0.221:145:0:1000000 + +# Remote username. +REMOTE_USER=gridgain + +# Number of nodes, used to wait for the specified number of nodes to start. +nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`)) + +# Run configuration. +CONFIGS="\ +-cfg ${SCRIPT_DIR}/../config/ignite-rebalancing-multicast-config.xml -nn ${nodesNum} -b 1 -w 0 -d 120 -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 120 -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 120 -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 120 -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 120 -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 120 -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 120 -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/9750ef6f/modules/yardstick/config/ignite-log4j.xml ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/ignite-log4j.xml b/modules/yardstick/config/ignite-log4j.xml new file mode 100644 index 0000000..ab3c781 --- /dev/null +++ b/modules/yardstick/config/ignite-log4j.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/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 new file mode 100644 index 0000000..e16c351 --- /dev/null +++ b/modules/yardstick/config/ignite-rebalancing-multicast-config.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + 10.20.0.219:47500..47509 + 10.20.0.221:47500..47509 + 10.20.0.222:47500..47509 + 10.20.0.223:47500..47509 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/config/ignite-rebalancing-multicast-win-config.xml ---------------------------------------------------------------------- diff --git a/modules/yardstick/config/ignite-rebalancing-multicast-win-config.xml b/modules/yardstick/config/ignite-rebalancing-multicast-win-config.xml new file mode 100644 index 0000000..0e55019 --- /dev/null +++ b/modules/yardstick/config/ignite-rebalancing-multicast-win-config.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + 127.0.0.1:47500..47509 + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/pom.xml ---------------------------------------------------------------------- diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml index dc4a033..553158c 100644 --- a/modules/yardstick/pom.xml +++ b/modules/yardstick/pom.xml @@ -34,7 +34,7 @@ 1.4.1-SNAPSHOT - 0.7.0 + 0.7.1 @@ -98,6 +98,12 @@ spring-aop ${spring.version} + + + org.apache.ignite + ignite-log4j + ${project.version} + http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java index 5eb7060..a0d5b6f 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java @@ -28,6 +28,10 @@ import org.apache.ignite.transactions.*; @SuppressWarnings({"UnusedDeclaration", "FieldCanBeLocal"}) public class IgniteBenchmarkArguments { /** */ + @Parameter(names = {"-cn", "--cacheName"}, description = "Cache name") + private String cacheName; + + /** */ @Parameter(names = {"-nn", "--nodeNumber"}, description = "Node number") private int nodes = 1; @@ -265,11 +269,18 @@ public class IgniteBenchmarkArguments { } /** + * @return Cache name. + */ + public String cacheName() { + return cacheName; + } + + /** * @return Description. */ public String description() { return "-nn=" + nodes + "-b=" + backups + "-sm=" + syncMode + "-cl=" + clientOnly + "-nc=" + nearCacheFlag + - (orderMode == null ? "" : "-wom=" + orderMode) + "-txc=" + txConcurrency; + (orderMode == null ? "" : "-wom=" + orderMode) + "-txc=" + txConcurrency+ "-cn=" + cacheName; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java index 3ecf904..397c7e9 100644 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java @@ -32,7 +32,10 @@ public abstract class IgniteCacheAbstractBenchmark extends IgniteAbstractBenchma @Override public void setUp(BenchmarkConfiguration cfg) throws Exception { super.setUp(cfg); - cache = cache(); + if (args.cacheName() != null) + cache = ignite().cache(args.cacheName()); + else + cache = cache(); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/9750ef6f/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/rabalance/IgniteRebalancePutGetBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/rabalance/IgniteRebalancePutGetBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/rabalance/IgniteRebalancePutGetBenchmark.java new file mode 100644 index 0000000..bd4657e --- /dev/null +++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/rabalance/IgniteRebalancePutGetBenchmark.java @@ -0,0 +1,72 @@ +/* + * 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.yardstick.cache.rabalance; + +import org.apache.ignite.*; +import org.apache.ignite.yardstick.cache.*; +import org.yardstickframework.*; + +import java.util.*; + +import static org.yardstickframework.BenchmarkUtils.*; + +/** + * + */ +public class IgniteRebalancePutGetBenchmark extends IgniteCacheAbstractBenchmark { + /** {@inheritDoc} */ + @Override public void setUp(BenchmarkConfiguration cfg) throws Exception { + super.setUp(cfg); + + println(cfg, "Populating query data..."); + + long start = System.nanoTime(); + + try (IgniteDataStreamer dataLdr = ignite().dataStreamer(cache.getName())) { + for (int i = 0; i < args.range() && !Thread.currentThread().isInterrupted(); i++) { + dataLdr.addData(i, i); + + if (i % 100000 == 0) + println(cfg, "Populated: " + i); + } + + dataLdr.flush(); + } + + println(cfg, "Finished populating query data in " + ((System.nanoTime() - start) / 1_000_000) + " ms."); + } + + /** {@inheritDoc} */ + @Override public boolean test(Map ctx) throws Exception { + int key = nextRandom(args.range()); + + Object val = cache.get(key); + + if (val != null) + key = nextRandom(args.range()); + + cache.put(key, key); + + return true; + } + + /** {@inheritDoc} */ + @Override protected IgniteCache cache() { + return null; + } +}