You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2011/01/20 20:46:50 UTC

svn commit: r1061477 - in /cassandra/branches/cassandra-0.7/contrib/stress: README.txt bin/stress src/org/apache/cassandra/contrib/stress/Session.java

Author: jbellis
Date: Thu Jan 20 19:46:50 2011
New Revision: 1061477

URL: http://svn.apache.org/viewvc?rev=1061477&view=rev
Log:
add stress.java README

Added:
    cassandra/branches/cassandra-0.7/contrib/stress/README.txt
Modified:
    cassandra/branches/cassandra-0.7/contrib/stress/bin/stress
    cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java

Added: cassandra/branches/cassandra-0.7/contrib/stress/README.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/README.txt?rev=1061477&view=auto
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/README.txt (added)
+++ cassandra/branches/cassandra-0.7/contrib/stress/README.txt Thu Jan 20 19:46:50 2011
@@ -0,0 +1,59 @@
+stress
+======
+
+Description
+-----------
+stress is a tool for benchmarking and load testing a Cassandra
+cluster.  It is significantly faster than the older py_stress tool.
+
+Setup
+-----
+Run `ant` from the Cassandra source directory, then Run `ant` from the
+contrib/stress directory.
+
+Usage
+-----
+There are three different modes of operation:
+
+    * inserting (loading test data)
+    * reading
+    * range slicing (only works with the OrderPreservingPartioner)
+    * indexed range slicing (works with RandomParitioner on indexed ColumnFamilies)
+
+Important options:
+    -o or --operation:
+        Sets the operation mode, one of 'insert', 'read', 'rangeslice', or 'indexedrangeslice'
+    -n or --num-keys:
+        the number of rows to insert/read/slice; defaults to one million
+    -d or --nodes:
+        the node(s) to perform the test against.  For multiple nodes, supply a
+        comma-separated list without spaces, ex: cassandra1,cassandra2,cassandra3
+    -y or --family-type:
+        Sets the ColumnFamily type.  One of 'Standard' or 'Super'.  If using super,
+        you probably want to set the -u option also.
+    -c or --columns:
+        the number of columns per row, defaults to 5
+    -u or --supercolumns:
+        use the number of supercolumns specified NOTE: you must set the -y
+        option appropriately, or this option has no effect.
+    -g or --get-range-slice-count:
+        This is only used for the rangeslice operation and will *NOT* work with
+        the RandomPartioner.  You must set the OrderPreservingPartioner in your
+        storage-conf.xml (note that you will need to wipe all existing data
+        when switching partioners.)  This option sets the number of rows to
+        slice at a time and defaults to 1000.
+    -r or --random:
+        Only used for reads.  By default, stress.py will perform reads on rows
+        with a guassian distribution, which will cause some repeats.  Setting
+        this option makes the reads completely random instead.
+    -i or --progress-interval:
+        The interval, in seconds, at which progress will be output.
+
+Remember that you must perform inserts before performing reads or range slices.
+
+Examples
+--------
+
+    * contrib/stress/bin/stress -d 192.168.1.101 # 1M inserts to given host
+    * contrib/stress/bin/stress -d 192.168.1.101 -o read # 1M reads
+    * contrib/stress/bin/stress -d 192.168.1.101,192.168.1.102 -n 10000000 # 10M inserts spread across two nodes

Modified: cassandra/branches/cassandra-0.7/contrib/stress/bin/stress
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/bin/stress?rev=1061477&r1=1061476&r2=1061477&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/bin/stress (original)
+++ cassandra/branches/cassandra-0.7/contrib/stress/bin/stress Thu Jan 20 19:46:50 2011
@@ -23,7 +23,7 @@ if [ "x$CLASSPATH" = "x" ]; then
         exit 1
     fi
 
-    # Circuit class files.
+    # Stress class files.
     if [ ! -d `dirname $0`/../build/classes ]; then
         echo "Unable to locate stress class files" >&2
         exit 1

Modified: cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java?rev=1061477&r1=1061476&r2=1061477&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java (original)
+++ cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java Thu Jan 20 19:46:50 2011
@@ -52,7 +52,7 @@ public class Session
         availableOptions.addOption("c",  "columns",              true,   "Number of columns per key, default:5.");
         availableOptions.addOption("S",  "column-size",          true,   "Size of column values in bytes, default:34.");
         availableOptions.addOption("C",  "cardinality",          true,   "Number of unique values stored in columns, default:50.");
-        availableOptions.addOption("d",  "nodes",                true,   "Host nodes (comma separated), default:locahost.");
+        availableOptions.addOption("d",  "nodes",                true,   "Host nodes (--comma separated), default:locahost.");
         availableOptions.addOption("s",  "stdev",                true,   "Standard Deviation Factor, default:0.1.");
         availableOptions.addOption("r",  "random",               false,  "Use random key generator (STDEV will have no effect), default:false.");
         availableOptions.addOption("f",  "file",                 true,   "Write output to file");