question

praveenkg avatar image
praveenkg asked Erick Ramirez answered

How can we optimize a single-partition read to be below 100ms?

I am working on cassandra application having a table modelled based on item number as partition key. Table has roughly 25K records. I am querying the table using Java application and i see for the one item, it takes more than 100ms to retrieve the data, I enabled the tracing in java and below are the results

'Execute CQL3 prepared query' to /<host>:0 took 1712μs
2022-02-10 10:16:03.414 INFO 33444 --- [ s0-io-5] c.d.o.d.i.core.tracker.RequestLogger : [s0|1449246075][Node(endPoint=/<hoost2>:9042, hostId=6100a2d7-cce9-409f-ac88-a7257daa027c, hashCode=b7f1344)] Success (365 ms) [1 values] SELECT * FROM system_traces.events WHERE session_id = ? [v0=59722650-8a2c-11ec-8a52-e97691b34e4a]
303 - /<hoost1>:0 - Reading data from [/<hoost1>]
303 - /<hoost1>:0 - Reading digests from [/<hoost2>]
401 - /<hoost1>:0 - Skipped 0/0 non-slice-intersecting sstables, included 0 due to tombstones
401 - /<hoost1>:0 - Merged data from memtables and 0 sstables during single-partition query on inv_by_item_loc for key '6202620010009'
401 - /<hoost1>:0 - Sending READS.SINGLE_READ message to /<hoost2>, size=420 bytes
401 - /<hoost1>:0 - Read 3 live rows and 0 tombstone ones
1500 - /<hoost1>:0 - READS.SINGLE_READ message received from /<hoost2>
0 - /<hoost2>:0 - READS.SINGLE_READ message received from /<hoost1>
1500 - /<hoost1>:0 - Processing response from /<hoost2>

is there any optimization we can do bring down the response time below 100ms

performance
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

There are a lot of factors which would affect the performance of reads on your cluster including:

  • cluster size and topology
  • data model
  • access patterns
  • hardware configuration
  • cluster load
  • etc

This isn't something we can answer in a Q&A forum. I suggest you log a ticket with DataStax Support so one of our engineers can request the necessary diagnostic data to assist you with the investigation. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.