ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [49/51] [abbrv] incubator-ignite git commit: # ignite-32 Fixed configuration in store benchmark.
Date Tue, 10 Feb 2015 07:03:46 GMT
# ignite-32 Fixed configuration in store benchmark.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e23789c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e23789c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e23789c7

Branch: refs/heads/ignite-sql-tests
Commit: e23789c714b22cb1046e9caf21736a6b943c4250
Parents: ce0c94a
Author: anovikov <anovikov@gridgain.com>
Authored: Tue Feb 10 11:31:28 2015 +0700
Committer: anovikov <anovikov@gridgain.com>
Committed: Tue Feb 10 11:31:28 2015 +0700

----------------------------------------------------------------------
 .../yardstick/config/benchmark-store.properties | 33 +++++++++----
 .../yardstick/config/ignite-store-config.xml    | 50 ++++++--------------
 .../yardstick/IgniteBenchmarkArguments.java     | 22 +++++++++
 .../org/apache/ignite/yardstick/IgniteNode.java |  5 ++
 4 files changed, 67 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e23789c7/modules/yardstick/config/benchmark-store.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-store.properties b/modules/yardstick/config/benchmark-store.properties
index c8e8cd7..8a7c265 100644
--- a/modules/yardstick/config/benchmark-store.properties
+++ b/modules/yardstick/config/benchmark-store.properties
@@ -42,7 +42,7 @@ JVM_OPTS=${JVM_OPTS}" \
 
 # List of default probes.
 # Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
 
 # Packages where the specified benchmark is searched by reflection mechanism.
 BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
@@ -64,13 +64,30 @@ DRIVER_HOSTS=localhost
 # 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`))
 
+# Each benchmark warm_up set to 60 seconds (1 minute).
+warm_up=60
+
+# Each benchmark run set to 300 seconds (5 mins).
+run=300
+
 # 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).
 CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds atomic-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t
64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -ds atomic-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -ds atomic-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds tx-store-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -wb -ds
tx-writeBehind-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds atomic-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds tx-store-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -wb -ds
tx-writeBehind-put,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds atomic-store-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds
atomic-writeBehind-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds
tx-store-put-get,\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d
${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -wb
-ds tx-writeBehind-put-get\
 "

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e23789c7/modules/yardstick/config/ignite-store-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-store-config.xml b/modules/yardstick/config/ignite-store-config.xml
index b107621..4cbee37 100644
--- a/modules/yardstick/config/ignite-store-config.xml
+++ b/modules/yardstick/config/ignite-store-config.xml
@@ -24,6 +24,18 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
         http://www.springframework.org/schema/beans  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+    <!--
+        Store data source.
+    -->
+    <bean id="storeDataSource" class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
+        <property name="dataSource">
+            <bean class="org.h2.jdbcx.JdbcConnectionPool" factory-method="create">
+                <constructor-arg value="jdbc:h2:tcp://localhost/store-benchmark/h2-benchmark"/>
+                <constructor-arg value="sa"/>
+                <constructor-arg value=""/>
+            </bean>
+        </property>
+    </bean>
 
     <bean id="sampleTypeMetadata" class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseTable" value="SAMPLE"/>
@@ -45,7 +57,7 @@
                     <property name="databaseName" value="VALUE"/>
                     <property name="databaseType" value="4"/>
                     <property name="javaName" value="id"/>
-                    <property name="javaType" value="java.lang.Integer"/>
+                    <property name="javaType" value="int"/>
                 </bean>
             </list>
         </property>
@@ -93,25 +105,9 @@
 
                     <property name="cacheStoreFactory">
                         <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
-                            <constructor-arg>
-                                <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
-                                    <property name="dataSource">
-                                        <bean class="org.h2.jdbcx.JdbcConnectionPool"
factory-method="create">
-                                            <constructor-arg value="jdbc:h2:tcp://localhost/store-benchmark/h2-benchmark"/>
-                                            <constructor-arg value="sa"/>
-                                            <constructor-arg value=""/>
-                                        </bean>
-                                    </property>
-                                </bean>
-                            </constructor-arg>
+                            <constructor-arg ref="storeDataSource"/>
                         </bean>
                     </property>
-
-                    <property name="readThrough" value="false"/>
-
-                    <property name="writeThrough" value="false"/>
-
-                    <property name="writeBehindEnabled" value="false"/>
                 </bean>
 
                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
@@ -133,25 +129,9 @@
 
                     <property name="cacheStoreFactory">
                         <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
-                            <constructor-arg>
-                                <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore">
-                                    <property name="dataSource">
-                                        <bean class="org.h2.jdbcx.JdbcConnectionPool"
factory-method="create">
-                                            <constructor-arg value="jdbc:h2:tcp://localhost/store-benchmark/h2-benchmark"/>
-                                            <constructor-arg value="sa"/>
-                                            <constructor-arg value=""/>
-                                        </bean>
-                                    </property>
-                                </bean>
-                            </constructor-arg>
+                            <constructor-arg ref="storeDataSource"/>
                         </bean>
                     </property>
-
-                    <property name="readThrough" value="false"/>
-
-                    <property name="writeThrough" value="false"/>
-
-                    <property name="writeBehindEnabled" value="false"/>
                 </bean>
             </list>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e23789c7/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 1204720..72d7013 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
@@ -86,6 +86,14 @@ public class IgniteBenchmarkArguments {
     @Parameter(names = {"-j", "--jobs"}, description = "Number of jobs for compute benchmarks")
     private int jobs = 10;
 
+    /** */
+    @Parameter(names = {"-cs", "--cacheStore"}, description = "Enable or disable cache store
readThrough, writeThrough")
+    private boolean storeEnabled;
+
+    /** */
+    @Parameter(names = {"-wb", "--writeBehind"}, description = "Enable or disable writeBehind
for cache store")
+    private boolean writeBehind;
+
     /**
      * @return Transaction concurrency.
      */
@@ -199,6 +207,20 @@ public class IgniteBenchmarkArguments {
     }
 
     /**
+     * @return {@code True} if enabled readThrough, writeThrough for cache.
+     */
+    public boolean isStoreEnabled() {
+        return storeEnabled;
+    }
+
+    /**
+     * @return {@code True} if enabled writeBehind for cache store.
+     */
+    public boolean isWriteBehind() {
+        return writeBehind;
+    }
+
+    /**
      * @return Description.
      */
     public String description() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e23789c7/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index 94e6f52..7d64398 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -105,6 +105,11 @@ public class IgniteNode implements BenchmarkServer {
                     cc.setEvictionPolicy(new CacheLruEvictionPolicy(50000));
             }
 
+            cc.setReadThrough(args.isStoreEnabled());
+
+            cc.setWriteThrough(args.isStoreEnabled());
+
+            cc.setWriteBehindEnabled(args.isWriteBehind());
         }
 
         TransactionConfiguration tc = c.getTransactionConfiguration();


Mime
View raw message