Skip to content

Instantly share code, notes, and snippets.

@eevans
Created January 29, 2016 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eevans/1babf3fab9206951d7e6 to your computer and use it in GitHub Desktop.
Save eevans/1babf3fab9206951d7e6 to your computer and use it in GitHub Desktop.
# bin/cassandra-stress user profile=key_rev_value.yaml ops\(insert=\1)
keyspace: key_rev_value__stress
keyspace_definition: |
CREATE KEYSPACE key_rev_value__stress WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
table: data
table_definition: |
CREATE TABLE data (
key text,
rev int,
tid timeuuid,
value blob,
PRIMARY KEY (key, rev, tid)
) WITH CLUSTERING ORDER BY (rev DESC, tid DESC)
AND bloom_filter_fp_chance = 0.1
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = 'A key-rev-value stress testing table'
AND compaction = {'base_time_seconds': '60', 'min_threshold': '4', 'unchecked_tombstone_compaction': 'false', 'bucket_high': '7', 'tombstone_threshold': '0.10', 'bucket_low': '0.10', 'class': 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy', 'max_window_size_seconds': '70736000'}
AND compression = {'chunk_length_kb': '256', 'sstable_compression': 'org.apache.cassandra.io.compress.DeflateCompressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 86400
AND max_index_interval = 1024
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
columnspec:
- name: key
size: gaussian(20..48) # distribution of key name sizes
population: uniform(1..5M) # 5M possible keys
- name: rev
cluster: fixed(100) # Up to 100 different revisions per key
- name: tid
cluster: fixed(25) # Up to 25 different renders per rev
- name: value
size: gaussian(1000..5000) # Values distributed between 1k and 5k
insert:
partitions: fixed(1)
select: fixed(1)/2500 # Effectively a batch size of 1
batchtype: LOGGED
queries:
example:
cql: SELECT * FROM data WHERE key = ? AND rev = ? LIMIT 1
fields: samerow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment