Update tools/stress/README.txt patch by ptnapoleon; reviewed by benedict for CASSANDRA-7933
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7cd11026 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7cd11026 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7cd11026 Branch: refs/heads/trunk Commit: 7cd1102606d51d8a5ac26ced818d50172acc1007 Parents: 160cbc1 Author: Benedict Elliott Smith <bened...@apache.org> Authored: Wed Jan 28 22:49:33 2015 +0000 Committer: Benedict Elliott Smith <bened...@apache.org> Committed: Wed Jan 28 22:49:33 2015 +0000 ---------------------------------------------------------------------- CHANGES.txt | 1 + tools/stress/README.txt | 113 +++++++++++++++++++++++++++---------------- 2 files changed, 72 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 7a38735..c40fc19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.3 + * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933) * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695) * Safer Resource Management (CASSANDRA-7705) * Make sure we compact highly overlapping cold sstables with http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cd11026/tools/stress/README.txt ---------------------------------------------------------------------- diff --git a/tools/stress/README.txt b/tools/stress/README.txt index 9f745c1..0046b25 100644 --- a/tools/stress/README.txt +++ b/tools/stress/README.txt @@ -4,55 +4,84 @@ cassandra-stress Description ----------- cassandra-stress is a tool for benchmarking and load testing a Cassandra -cluster. It is significantly faster than the older py_stress tool. +cluster. cassandra-stress supports testing arbitrary CQL tables and queries +to allow users to benchmark their data model. Setup ----- -Run `ant` from the Cassandra source directory, then cassandra-stress can be invoke from tools/bin/cassandra-stress +Run `ant` from the Cassandra source directory, then cassandra-stress can be invoked from tools/bin/cassandra-stress. +cassandra-stress supports benchmarking any Cassandra cluster of version 2.0+. 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 --cells: - the number of cells 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, cassandra-stress 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. +There are several operation types: + + * write-only, read-only, and mixed workloads of standard data + * write-only and read-only workloads for counter columns + * user configured workloads, running custom queries on custom schemas + * support for legacy cassandra-stress operations + +The syntax is `cassandra-stress <command> [options]`. If you want more information on a given command +or options, just run `cassandra-stress help <command|option>`. + +Commands: + read: + Multiple concurrent reads - the cluster must first be populated by a write test + write: + Multiple concurrent writes against the cluster + mixed: + Interleaving of any basic commands, with configurable ratio and distribution - the cluster must first be populated by a write test + counter_write: + Multiple concurrent updates of counters. + counter_read: + Multiple concurrent reads of counters. The cluster must first be populated by a counterwrite test. + user: + Interleaving of user provided queries, with configurable ratio and distribution. + See http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema + help: + Print help for a command or option + print: + Inspect the output of a distribution definition + legacy: + Legacy support mode + +Primary Options: + -pop: + Population distribution and intra-partition visit order + -insert: + Insert specific options relating to various methods for batching and splitting partition updates + -col: + Column details such as size and count distribution, data generator, names, comparator and if super columns should be used + -rate: + Thread count, rate limit or automatic mode (default is auto) + -mode: + Thrift or CQL with options + -errors: + How to handle errors when encountered during stress + -sample: + Specify the number of samples to collect for measuring latency + -schema: + Replication settings, compression, compaction, etc. + -node: + Nodes to connect to + -log: + Where to log progress to, and the interval at which to do it + -transport: + Custom transport factories + -port: + The port to connect to cassandra nodes on + -sendto: + Specify a stress server to send this command to + +Suboptions: + Every command and primary option has its own collection of suboptions. These are too numerous to list here. + For information on the suboptions for each command or option, please use the help command, + `cassandra-stress help <command|option>`. Examples -------- - * tools/bin/cassandra-stress -d 192.168.1.101 # 1M inserts to given host - * tools/bin/cassandra-stress -d 192.168.1.101 -o read # 1M reads - * tools/bin/cassandra-stress -d 192.168.1.101,192.168.1.102 -n 10000000 # 10M inserts spread across two nodes + * tools/bin/cassandra-stress write n=1000000 -node 192.168.1.101 # 1M inserts to given host + * tools/bin/cassandra-stress read n=10000000 -node 192.168.1.101 -o read # 1M reads + * tools/bin/cassandra-stress write -node 192.168.1.101,192.168.1.102 n=10000000 # 10M inserts spread across two nodes + * tools/bin/cassandra-stress help -pop # Print help for population distribution option