The cfs-stress tool
The cfs-stress tool performs stress testing of the Cassandra File System (CFS) layer.
Usage:
$ cfs-stress [options] cfs_directory
where cfs_directory sets where to store test files.
Syntax conventions | Description |
---|---|
Italics |
Variable value. Replace with a user-defined value. |
[ ] |
Optional. Square brackets ( [ ] ) surround optional command
arguments. Do not type the square brackets. |
( ) |
Group. Parentheses ( ( ) ) identify a group to choose from. Do
not type the parentheses. |
| |
Or. A vertical bar ( | ) separates alternative elements. Type
any one of the elements. Do not type the vertical bar. |
[ -- ] |
Separate the command line options from the command arguments with two hyphens (
-- ). This syntax is useful when arguments might be mistaken for
command line options. |
Note: The tool uses the listen_address property in the
cassandra.yaml file. If not using localhost, add
the correct IP as an additional
argument:
$ stress-cfs [options] cfs_directory listen_address
The location of the
cassandra.yaml file depends on
the type of installation:
Package installations | /etc/dse/cassandra/cassandra.yaml |
Tarball installations | install_location/resources/cassandra/conf/cassandra.yaml |
Short form | Long form | Description |
---|---|---|
-d |
--data-generator
class |
Data generator to create files. Available generators:
RandomDataGenerator, TextDataGenerator, ZeroDataGenerator. The RandomDataGenerator is a fast pseudo-random data generator that delivers about 1.5 GB of data per second on a single core of Core i7 @ 2.4 GHz. |
-h |
-help |
Display help. |
-n |
--count number |
Total number of files read/written. Default: 100. |
-o |
--operation R|W|WR|WRD |
Operation: R read, W write, WR write and read, WRD write and read and delete. Default: W |
--r |
--streams number
|
Maximum number of streams kept open per thread. Default 2. |
-s |
--size number |
Size of each file in KB. Default 1024. |
--shared-cfs
|
Causes all threads to share the same CFS object. | |
-t |
--threads number
|
Number of threads. Default 8. |
The cfs-stress tool is located in the tools directory.
The default location of the tools
directory depends on the type of installation:
Installer-Services and Package installations | /usr/share/dse/tools |
Installer-No Services and Tarball installations | install_location/dse/tools |
Example
From the tools directory:
$ ./cfs-stress cfs_directory
The output looks like:
Writing 104 MB to cfs://localhost:9160/user/pt/cfs_directory in 100 files.
progress bytes curr rate avg rate max latency
0.0% 0.0 MB 0.0 MB/s 0.0 MB/s ------
0.0% 0.0 MB 0.0 MB/s 0.0 MB/s ------
0.0% 0.0 MB 0.0 MB/s 0.0 MB/s ------
0.0% 0.0 MB 0.0 MB/s 0.0 MB/s ------
0.0% 0.0 MB 0.0 MB/s 0.0 MB/s ------
32.0% 33.6 MB 2.6 MB/s 5.5 MB/s 129.554 ms
80.0% 83.9 MB 31.4 MB/s 11.7 MB/s 10.303 ms
82.0% 86.0 MB 48.5 MB/s 10.5 MB/s ------
100.0% 104.9 MB 14.5 MB/s 12.4 MB/s 0.012 ms
Data | Description |
---|---|
progress | Total progress of the stress operation. |
bytes | Total bytes written/read. |
curr rate | Current rate of bytes being written/read per second. |
avg rate | Average rate of bytes being written/read per second. |
max latency | Maximum latency in milliseconds during the current reporting window. |