0

I am trying to run a stress test using the cassandra-stress tool with profiles on a 6 node cluster with a replication factor=3.

./cassandra-stress user profile=/path/to/cassandra_stress.yaml duration=2h ops\(insert=20,select=10\) **cl=local_quorum** no-warmup -node nodeaddress -transport truststore=/path/to/tls/truststore.jks truststore-password=***** -rate threads=5 -log level=verbose file=/path/to/log -graph file=graph_.html title='Graph' & 2>1

The execution stops at some point with a ReadTimeout and the logs show the following:

com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_QUORUM (2 replica were required but only 1 acknowledged the write)

com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency ALL (3 replica were required but only 2 acknowledged the read)

I am not sure why it is taking cl=local_quorum for writes but not for reads. Any insights would be helpful.

Profile

# Keyspace Name keyspace: d3 keyspace_definition: |   CREATE KEYSPACE d3 WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3'} AND DURABLE_WRITES = true;


# Table name table: stress_offheap_long table_definition: |   CREATE TABLE d3.stress_offheap_long (
    dart_id timeuuid,
    dart_version_id timeuuid,
    account_id timeuuid,
    amount double,
    data text,
    state text, PRIMARY KEY (dart_id, dart_version_id)   ) WITH CLUSTERING ORDER BY (dart_version_id DESC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys':'ALL', 'rows_per_partition':'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
    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 = 0.0
    AND speculative_retry = '99.0PERCENTILE';

columnspec:
  - name: dart_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: art_version_id
    size: gaussian(36..64)

  - name: account_id
    size: gaussian(36..64)
    population: uniform(1..10M)

  - name: amount
    size: fixed(1)

  - name: data
    size: gaussian(5000..20000)

  - name: state
    size: gaussian(1..2)
    population: fixed(1)

### Batch Ratio Distribution Specifications ###

insert:
  partitions: fixed(1)

  select:    fixed(1)/1000

  batchtype: UNLOGGED             # Unlogged batches


#
# A list of queries you wish to run against the schema
#
queries:
   select:
      cql: select * from stress_offheap_long where dart_id = ? and dart_version_id=? LIMIT 1
      fields: samerow
Community
  • 1
  • 1
Chirag
  • 11
  • 2

0 Answers0