Skip to content

Commit

Permalink
More renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyrazorblade committed Feb 14, 2024
1 parent c8fd4da commit 94f5356
Show file tree
Hide file tree
Showing 15 changed files with 598 additions and 73 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish-main-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/distributions/tlp-stress-6.0.0.zip
asset_name: tlp-stress-6.0.0.zip
asset_path: ./build/distributions/easy-cass-stress-6.0.0.zip
asset_name: easy-cass-stress-6.0.0.zip
asset_content_type: application/gzip
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ settings.gradle
/metrics*
/logs/
/*.csv
tlp-stress.ipr
tlp-stress.iws
easy-cass-stress.ipr
easy-cass-stress.iws
/*.rpm
buildSrc/.gradle/
buildSrc/build/
Expand Down
263 changes: 235 additions & 28 deletions docs/index.html

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions manual/MANUAL.adoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
= tlp-stress
= easy-cass-stress
Jon Haddad <jon@rustyrazorblade.com>
Anthony Grasso <anthony@thelastpickle.com>
:toc: left
:icon: font

tlp-stress is a workload-centric stress tool for Apache Cassandra, written in Kotlin.
easy-cass-stress is a workload-centric stress tool for Apache Cassandra, written in Kotlin.
Workloads are easy to write and because they are written in code. You
have the ultimate flexibility to build whatever you want without having to learn and
operate around the restrictions of a configuration DSL. Workloads can be tweaked via command line
parameters to make them fit your environment more closely.

One of the goals of tlp-stress is to provide enough pre-designed
One of the goals of easy-cass-stress is to provide enough pre-designed
workloads _out of the box,_ so it’s unnecessary to code up a workload for
most use cases. For instance, it’s very common to have a key value
workload, and want to test that. tlp-stress allows you to customize a
workload, and want to test that. easy-cass-stress allows you to customize a
pre-configured key-value workload, using simple parameters to modify the
workload to fit your needs. Several workloads are included, such as:

Expand Down Expand Up @@ -48,7 +48,7 @@ The current version is {EASY_CASS_STRESS_VERSION}.
$ echo "deb https://dl.bintray.com/thelastpickle/tlp-tools-deb weezy main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2895100917357435
$ sudo apt update
$ sudo apt install tlp-stress
$ sudo apt install easy-cass-stress
```
==== RPM Packages
Expand All @@ -67,7 +67,7 @@ enabled=1
Then run the following to install:
```
$ yum install tlp-stress
$ yum install easy-cass-stress
```
Expand All @@ -78,15 +78,15 @@ Further information can be found on the https://bintray.com/beta/#/thelastpickle
[subs="attributes"]
```
$ curl -L -O "https://dl.bintray.com/thelastpickle/tlp-tools-tarball/tlp-stress-{EASY_CASS_STRESS_VERSION}.tar
$ tar -xzf tlp-stress-{EASY_CASS_STRESS_VERSION}.tar
$ curl -L -O "https://dl.bintray.com/thelastpickle/tlp-tools-tarball/easy-cass-stress-{EASY_CASS_STRESS_VERSION}.tar
$ tar -xzf easy-cass-stress-{EASY_CASS_STRESS_VERSION}.tar
```
////

=== Building / Using the Stress Tool from Source

This is currently the only way to use the latest version of tlp-stress. I'm working on getting the packages updated.
This is currently the only way to use the latest version of easy-cass-stress. I'm working on getting the packages updated.

////
This is advisable only if you're comfortable debugging the bash scripts, gradle, and Kotlin yourself and want to be either on the bleeding edge or add a feature. If not, that's OK, we recommend using one of the above packages instead.
Expand All @@ -96,12 +96,12 @@ First you'll need to clone and build the repo. You can grab the source here and


```bash
$ git clone https://github.com/thelastpickle/tlp-stress.git
$ cd tlp-stress
$ git clone https://github.com/thelastpickle/easy-cass-stress.git
$ cd easy-cass-stress
$ ./gradlew shadowJar
```

You can now run the stress tool via the `bin/tlp-stress` script. This is not the same script you'll be running if you've installed from a package or the tarball.
You can now run the stress tool via the `bin/easy-cass-stress` script. This is not the same script you'll be running if you've installed from a package or the tarball.

You can also create a zip, tar, or deb package by doing the following:

Expand All @@ -116,18 +116,18 @@ $ ./gradlew deb
Assuming you have either a CCM cluster or are running a single node
locally, you can run this quickstart.

Either add the `bin` directory to your PATH or from within tlp-stress
Either add the `bin` directory to your PATH or from within easy-cass-stress
run the following command to execute 10,000 queries:

```
include::examples/tlp-stress-keyvalue.txt[lines=1]
include::examples/easy-cass-stress-keyvalue.txt[lines=1]
```

You'll see the output of the keyspaces and tables that are created as well as some statistical information regarding the workload:

[source,bash,options="nowrap"]
----
include::examples/tlp-stress-keyvalue.txt[lines=2..-1]
include::examples/easy-cass-stress-keyvalue.txt[lines=2..-1]
----

If you've made it this far, congrats! You've run your first workload.
Expand All @@ -136,14 +136,14 @@ If you've made it this far, congrats! You've run your first workload.

== Usage

You'll probably want to do a bit more than simply run a few thousand queries against a KeyValue table with default settings. The nice part about tlp-stress is that it not only comes with a variety of workloads that you can run to test your cluster, but that it allows you to change many of the parameters. In the quickstart example we used the `-n` flag to change the total number of operations `tlp-stress` will execute against the database. There are many more options available, this section will cover some of them.
You'll probably want to do a bit more than simply run a few thousand queries against a KeyValue table with default settings. The nice part about easy-cass-stress is that it not only comes with a variety of workloads that you can run to test your cluster, but that it allows you to change many of the parameters. In the quickstart example we used the `-n` flag to change the total number of operations `easy-cass-stress` will execute against the database. There are many more options available, this section will cover some of them.

=== General Help

`tlp-stress` will display the help if the `tlp-stress` command is run without any arguments or if the `--help` flag is passed:
`easy-cass-stress` will display the help if the `easy-cass-stress` command is run without any arguments or if the `--help` flag is passed:

```bash
include::examples/tlp-stress-help.txt[]
include::examples/easy-cass-stress-help.txt[]
```

=== Listing All Workloads
Expand Down Expand Up @@ -181,13 +181,13 @@ You might need to run a stress test for a given duration instead of providing a
For example, running a test for 1 hours and 30 minutes will be done as follows:

```
$ tlp-stress run KeyValue -d "1h 30m"
$ easy-cass-stress run KeyValue -d "1h 30m"
```

To run a test for 1 days, 3 hours and 15 minutes (why not?), run tlp-stress as follows:
To run a test for 1 days, 3 hours and 15 minutes (why not?), run easy-cass-stress as follows:

```
$ tlp-stress run KeyValue -d "1d 3h 15m"
$ easy-cass-stress run KeyValue -d "1d 3h 15m"
```

==== Partition Keys
Expand Down Expand Up @@ -273,7 +273,7 @@ Ideally we’d like to tweak this workload to be closer to our production
use case. Let’s use random sections from various books:

```
$ tlp-stress run KeyValue --field.keyvalue.value='book(20,40)`
$ easy-cass-stress run KeyValue --field.keyvalue.value='book(20,40)`
```

Instead of using random strings of garbage, the KeyValue workload will
Expand All @@ -285,23 +285,23 @@ workload to specify which fields can be used this way.

=== Logging

`tlp-stress` uses the https://logging.apache.org/[Log4J 2] logging framework.
`easy-cass-stress` uses the https://logging.apache.org/[Log4J 2] logging framework.

You can find the default log4j config inhttps://github.com/rustyrazorblade/tlp-stress/blob/main/src/main/resources/log4j2.yaml[`conf`, window="_blank"]. This should be suitable for most use cases.
You can find the default log4j config inhttps://github.com/rustyrazorblade/easy-cass-stress/blob/main/src/main/resources/log4j2.yaml[`conf`, window="_blank"]. This should be suitable for most use cases.

To use your own logging configuration, simply set the shell variable `TLP_STRESS_LOG4J` to the path of the new logging configuration before running `tlp-stress` to point to the config file of your choice.
To use your own logging configuration, simply set the shell variable `TLP_STRESS_LOG4J` to the path of the new logging configuration before running `easy-cass-stress` to point to the config file of your choice.

For more information on how to configure Log4J 2 please see the https://logging.apache.org/log4j/2.x/manual/configuration.html[configuration] documentation.


==== Debian Package

The Debian package installs a basic configuration file to `/etc/tlp-stress/log4j2.yaml`.
The Debian package installs a basic configuration file to `/etc/easy-cass-stress/log4j2.yaml`.


=== Exporting Metrics

tlp-stress automatically runs an HTTP server exporting metrics in Prometheus format on port 9501.
easy-cass-stress automatically runs an HTTP server exporting metrics in Prometheus format on port 9501.

=== Workload Restrictions

Expand All @@ -325,4 +325,4 @@ $ docker-compose up docs

=== Writing a Custom Workload

`tlp-stress` is a work in progress. Writing a stress workload isn't documented yet as it is still changing.
`easy-cass-stress` is a work in progress. Writing a stress workload isn't documented yet as it is still changing.
158 changes: 158 additions & 0 deletions manual/examples/easy-cass-stress-help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
$ bin/easy-cass-stress
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Usage: easy-cass-stress [options] [command] [command options]
Options:
--help, -h
Shows this help.
Default: false
Commands:
run Run a easy-cass-stress profile
Usage: run [options]
Options:
--cl
Consistency level for reads/writes (Defaults to LOCAL_ONE, set
custom default with TLP_STRESS_CONSISTENCY_LEVEL).
Default: LOCAL_ONE
Possible Values: [ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE]
--compaction
Compaction option to use. Double quotes will auto convert to
single for convenience. A shorthand is also available: stcs, lcs,
twcs. See the full documentation for all possibilities.
Default: <empty string>
--compression
Compression options
Default: <empty string>
--concurrency, -c
DEPRECATED. Concurrent queries allowed. Increase for larger
clusters. This flag is deprecated and does nothing.
Default: 100
--coordinatoronly, --co
Coordinator only made. This will cause easy-cass-stress to round
robin between nodes without tokens. Requires using
-Djoin_ring=false in cassandra-env.sh. When using this option you
must only provide a coordinator to --host.
Default: false
--core-connections
Sets the number of core connections per host
Default: 4
--cql
Additional CQL to run after the schema is created. Use for DDL
modifications such as creating indexes.
Default: []
--csv
Write metrics to this file in CSV format.
Default: <empty string>
--dc
The data center to which requests should be sent
Default: <empty string>
--deleterate, --deletes
Deletion Rate, 0-1. Workloads may have their own defaults.
Default is dependent on workload.
--drop
Drop the keyspace before starting.
Default: false
--duration, -d
Duration of the stress test. Expressed in format 1d 3h 15m
Default: 0
--field.
Override a field's data generator. Example usage:
--field.tablename.fieldname='book(100,200)'
Syntax: --field.key=value
Default: {}
--hdr
Print HDR Histograms using this prefix
Default: <empty string>
-h, --help
Show this help
--host
Default: 127.0.0.1
--id
Identifier for this run, will be used in partition keys. Make
unique for when starting concurrent runners.
Default: 001
--iterations, -i, -n
Number of operations to run.
Default: 0
--keycache
Key cache setting
Default: ALL
--keyspace
Keyspace to use
Default: tlp_stress
--max-connections
Sets the number of max connections per host
Default: 8
--max-requests
Sets the max requests per connection
Default: 32768
--maxrlat
Max Read Latency
--maxwlat

--no-schema
Skips schema creation
Default: false
--paginate
Paginate through the entire partition before completing
Default: false
--paging
Override the driver's default page size.
--partitiongenerator, --pg
Method of generating partition keys. Supports random, normal
(gaussian), and sequence.
Default: random
--partitions, -p
Max value of integer component of first partition key.
Default: 1000000
--password, -P
Default: cassandra
--populate
Pre-population the DB with N rows before starting load test.
Default: 0
--port
Override the cql port. Defaults to 9042.
Default: 9042
--prometheusport
Override the default prometheus port.
Default: 9500
--queue
Queue Depth. 2x the rate by default.
Default: 10000
--rate
Rate limiter, accepts human numbers. 0 = disabled
Default: 5000
--readrate, --reads, -r
Read Rate, 0-1. Workloads may have their own defaults. Default
is dependent on workload.
--replication
Replication options
Default: {'class': 'SimpleStrategy', 'replication_factor':3 }
--rowcache
Row cache setting
Default: NONE
--ssl
Enable SSL
Default: false
--threads, -t
Threads to run
Default: 1
--ttl
Table level TTL, 0 to disable.
Default: 0
--username, -U
Default: cassandra
--workload., -w.
Override workload specific parameters.
Syntax: --workload.key=value
Default: {}

info Get details of a specific workload.
Usage: info

list List all workloads.
Usage: list

fields null
Usage: fields


28 changes: 28 additions & 0 deletions manual/examples/easy-cass-stress-keyvalue.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$ bin/easy-cass-stress run KeyValue -n 10000
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Creating tlp_stress:
CREATE KEYSPACE
IF NOT EXISTS tlp_stress
WITH replication = {'class': 'SimpleStrategy', 'replication_factor':3 }

Creating schema
Executing 10000 operations with consistency level LOCAL_ONE
Connected
Creating Tables
CREATE TABLE IF NOT EXISTS keyvalue (
key text PRIMARY KEY,
value text
) WITH caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND default_time_to_live = 0
Preparing queries
Initializing metrics
Starting with fixed rate scheduler at 5000.0 rps
Connecting
Creating generator random
1 threads prepared.
Starting main runner
[Thread 0]: Running the profile for 10000 iterations...
Writes Reads Deletes Errors
Count Latency (p99) 1min (req/s) | Count Latency (p99) 1min (req/s) | Count Latency (p99) 1min (req/s) | Count 1min (errors/s)
5013 72.22 0 | 4987 93.94 0 | 0 0 0 | 0 0
5013 72.22 0 | 4987 93.94 0 | 0 0 0 | 0 0
Stress complete, 1.
Loading

0 comments on commit 94f5356

Please sign in to comment.