[ 
https://issues.apache.org/jira/browse/CASSANDRA-18831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056327#comment-18056327
 ] 

Dmitry Konstantinov edited comment on CASSANDRA-18831 at 2/3/26 8:54 PM:
-------------------------------------------------------------------------

An extra observation for ZGC: it feels much better if we reduce memtable max 
heap size in conf/cassandra.yaml
{code:java}
memtable_heap_space: 2048MiB # by default Cassandra uses 1/4 of heap size, in 
our case it is 7887MiB {code}
with this change I do not observe allocation stalls anymore even for 200 
threads and have a much higher throughput (getting close to G1) with a good 
enough latency:
||ZGC, JDK21, 100 client threads||ZGC, JDK21, 200 client threads||
|{{Op rate                   :  163,608 op/s  [insert: 163,608 op/s]}}
{{Partition rate            :  163,608 pk/s  [insert: 163,608 pk/s]}}
{{Row rate                  : 1,636,084 row/s [insert: 1,636,084 row/s]}}
{{Latency mean              :    0.6 ms [insert: 0.6 ms]}}
{{Latency median            :    0.5 ms [insert: 0.5 ms]}}
{{Latency 95th percentile   :    0.9 ms [insert: 0.9 ms]}}
{{Latency 99th percentile   :    1.2 ms [insert: 1.2 ms]}}
{{Latency 99.9th percentile :   11.6 ms [insert: 11.6 ms]}}
{{Latency max               :   35.9 ms [insert: 35.9 ms]}}
{{Total partitions          : 15,000,000 [insert: 15,000,000]}}
{{Total errors              :          0 [insert: 0]}}
{{Total GC count            : 178}}
{{Total GC memory           : 220.252 GiB}}
{{Total GC time             :   51.9 seconds}}
{{Avg GC time               :  291.5 ms}}
{{StdDev GC time            :  571.7 ms}}
{{Total operation time      : 00:01:31}}|{{Op rate                   :  193,924 
op/s  [insert: 193,924 op/s]}}
{{Partition rate            :  193,924 pk/s  [insert: 193,924 pk/s]}}
{{Row rate                  : 1,939,237 row/s [insert: 1,939,237 row/s]}}
{{Latency mean              :    1.0 ms [insert: 1.0 ms]}}
{{Latency median            :    0.8 ms [insert: 0.8 ms]}}
{{Latency 95th percentile   :    1.8 ms [insert: 1.8 ms]}}
{{Latency 99th percentile   :    3.7 ms [insert: 3.7 ms]}}
{{Latency 99.9th percentile :   20.5 ms [insert: 20.5 ms]}}
{{Latency max               :   76.1 ms [insert: 76.1 ms]}}
{{Total partitions          : 15,000,000 [insert: 15,000,000]}}
{{Total errors              :          0 [insert: 0]}}
{{Total GC count            : 224}}
{{Total GC memory           : 80.476 GiB}}
{{Total GC time             :   71.0 seconds}}
{{Avg GC time               :  317.0 ms}}
{{StdDev GC time            :  646.6 ms}}
{{Total operation time      : 00:01:17}}|


was (Author: dnk):
An extra observation for ZGC: it feels much better if we reduce memtable max 
heap size in conf/cassandra.yaml
{code:java}
memtable_heap_space: 2048MiB # by default Cassandra uses 1/4 of heap size, in 
our case it is 7887MiB {code}
with this change I do not observe allocation stalls anymore even for 200 
threads and have a higher throughput with a good enough latency:
||ZGC, JDK21, 100 client threads||ZGC, JDK21, 200 client threads||
|{{Op rate                   :  163,608 op/s  [insert: 163,608 op/s]}}
{{Partition rate            :  163,608 pk/s  [insert: 163,608 pk/s]}}
{{Row rate                  : 1,636,084 row/s [insert: 1,636,084 row/s]}}
{{Latency mean              :    0.6 ms [insert: 0.6 ms]}}
{{Latency median            :    0.5 ms [insert: 0.5 ms]}}
{{Latency 95th percentile   :    0.9 ms [insert: 0.9 ms]}}
{{Latency 99th percentile   :    1.2 ms [insert: 1.2 ms]}}
{{Latency 99.9th percentile :   11.6 ms [insert: 11.6 ms]}}
{{Latency max               :   35.9 ms [insert: 35.9 ms]}}
{{Total partitions          : 15,000,000 [insert: 15,000,000]}}
{{Total errors              :          0 [insert: 0]}}
{{Total GC count            : 178}}
{{Total GC memory           : 220.252 GiB}}
{{Total GC time             :   51.9 seconds}}
{{Avg GC time               :  291.5 ms}}
{{StdDev GC time            :  571.7 ms}}
{{Total operation time      : 00:01:31}}|{{Op rate                   :  193,924 
op/s  [insert: 193,924 op/s]}}
{{Partition rate            :  193,924 pk/s  [insert: 193,924 pk/s]}}
{{Row rate                  : 1,939,237 row/s [insert: 1,939,237 row/s]}}
{{Latency mean              :    1.0 ms [insert: 1.0 ms]}}
{{Latency median            :    0.8 ms [insert: 0.8 ms]}}
{{Latency 95th percentile   :    1.8 ms [insert: 1.8 ms]}}
{{Latency 99th percentile   :    3.7 ms [insert: 3.7 ms]}}
{{Latency 99.9th percentile :   20.5 ms [insert: 20.5 ms]}}
{{Latency max               :   76.1 ms [insert: 76.1 ms]}}
{{Total partitions          : 15,000,000 [insert: 15,000,000]}}
{{Total errors              :          0 [insert: 0]}}
{{Total GC count            : 224}}
{{Total GC memory           : 80.476 GiB}}
{{Total GC time             :   71.0 seconds}}
{{Avg GC time               :  317.0 ms}}
{{StdDev GC time            :  646.6 ms}}
{{Total operation time      : 00:01:17}}|

> JDK21 support
> -------------
>
>                 Key: CASSANDRA-18831
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18831
>             Project: Apache Cassandra
>          Issue Type: Task
>          Components: Build
>            Reporter: Achilles Benetopoulos
>            Assignee: Josh McKenzie
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 5.1
>
>         Attachments: batch_profile_seq.yaml, 
> image-2026-02-03-19-05-41-619.png, image-2026-02-03-19-16-37-640.png, 
> jdk21-patch, jdk_gc.html, jdk_gc_g1_zgc_shen.html
>
>          Time Spent: 9h
>  Remaining Estimate: 0h
>
> This patch builds on the work in CASSANDRA-16895 that added JDK17 to the list 
> of supported Java versions, and extends that work to enable building and 
> running Cassandra under JDK21.
> The following commits comprise the changes included in the attached patch:
>  - 
> [https://github.com/apache/cassandra/commit/b15d4d6980e787ab5f3405ca8cb17a9c92a4aa47]
>  - 
> [https://github.com/apache/cassandra/commit/0c5df38dafe58bfec8924e81507bb604e1543897]
>  - 
> [https://github.com/apache/cassandra/commit/6506b7279d98eed4b2b65b71e0c6f41eb78c6913]
>  - 
> [https://github.com/apache/cassandra/commit/564cbd534c5a975cda0c629c14c68c8745b41451]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to