[
https://issues.apache.org/jira/browse/CASSANDRA-21354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18078873#comment-18078873
]
Dmitry Konstantinov commented on CASSANDRA-21354:
-------------------------------------------------
Draft results for a 10 rows partition read test:
||Before||After||
|{code:java}
{code}
Results:
Op rate : 129,181 op/s [partition-select: 129,181 op/s]
Partition rate : 128,507 pk/s [partition-select: 128,507 pk/s]
Row rate : 1,285,070 row/s [partition-select: 1,285,070 row/s]
Latency mean : 2.3 ms
Latency median : 1.9 ms
Latency 95th percentile : 4.3 ms
Latency 99th percentile : 13.7 ms
Latency 99.9th percentile : 25.1 ms
Latency max : 98.0 ms
Total partitions : 14,921,742
Total errors : 0
Total GC count : 31
Total GC memory : 534.540 GiB
Total GC time : 0.3 seconds
Avg GC time : 11.2 ms
StdDev GC time : 2.2 ms
Total operation time : 00:01:56
{code} {code}|{code:java}
Results:
Op rate : 149,053 op/s [partition-select: 149,053 op/s]
Partition rate : 148,275 pk/s [partition-select: 148,275 pk/s]
Row rate : 1,482,753 row/s [partition-select: 1,482,753 row/s]
Latency mean : 2.0 ms
Latency median : 1.5 ms
Latency 95th percentile : 3.8 ms
Latency 99th percentile : 14.1 ms
Latency 99.9th percentile : 28.1 ms
Latency max : 417.9 ms
Total partitions : 14,921,696
Total errors : 0
Total GC count : 24
Total GC memory : 423.528 GiB
Total GC time : 0.3 seconds
Avg GC time : 12.8 ms
StdDev GC time : 4.5 ms
Total operation time : 00:01:40 {code}|
> Avoid serialization and deserialization for coordinator-local single
> partition data read
> ----------------------------------------------------------------------------------------
>
> Key: CASSANDRA-21354
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21354
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Local/Other
> Reporter: Dmitry Konstantinov
> Assignee: Dmitry Konstantinov
> Priority: Normal
> Fix For: 6.x, 7.x
>
> Attachments: image-2026-05-07-10-10-16-886.png, may3_max_alloc.html
>
>
> Currently when we execute a local read we fetch data from SSTables and
> Memtables using a merging iterator and write it to a byte buffer. Later when
> we combine a CQL response we deserialize the data back to iterate over them
> as a part of coordinator logic. So, we allocate rows and cells twice here,
> during the read from SSTables/Memtables and during the deserialization by
> coordinator logic if we read data locally (it is a typical scenario because
> usually drivers are sending requests to replicas).
> The idea of optimization: if we do a single partition read of a small number
> of rows we can keep the data in memory and avoid this double row objects
> allocation.
> We should limit amount of such data kept in memory to avoid too much pressure
> on GC due to extended lifetime for these objects and promoting them to an old
> generation.
> So, a system property can be used to limit number of rows we keep in memory
> in this scenario, as well as to disable the logic in case of any issues.
> !image-2026-05-07-10-10-16-886.png|width=800!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]