Skip to content

Instantly share code, notes, and snippets.

@tzach
Last active September 22, 2020 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tzach/429f03ac991e0ff2fa11 to your computer and use it in GitHub Desktop.
Save tzach/429f03ac991e0ff2fa11 to your computer and use it in GitHub Desktop.
cassandra-stress for KairosDB
### DML ###
# Keyspace Name
keyspace: kairos
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE kairos WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};
# Table name
table: data_points
# The CQL for creating a table you wish to stress (optional if it already exists)
table_definition: |
CREATE TABLE data_points (
key blob,
column1 blob,
value blob,
PRIMARY KEY (key, column1)
) WITH COMPACT STORAGE
AND CLUSTERING ORDER BY (column1 ASC)
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 1.0
AND speculative_retry = 'NONE'
### Column Distribution Specifications ###
### Batch Ratio Distribution Specifications ###
insert:
partitions: fixed(1)
select: fixed(1)/1000
batchtype: UNLOGGED
#
# A list of queries you wish to run against the schema
#
queries:
singlepoint:
cql: select * from data_points where key = ? LIMIT 1
fields: samerow
# Run stress
# ./tools/bin/cassandra-stress user profile=kairosdb-stress.yaml ops\(insert=1\) -rate threads=100
# ./tools/bin/cassandra-stress user profile=kairosdb-stress.yaml ops\(singlepoint=1\) -rate threads=100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment