This document covers the configuration of Cassandra 5.0.X, included with Apigee Edge for Private Cloud version 4.54.00 or later. Refer to the Appendix section for details on applying the configurations described on this page.
Garbage collector configuration
Modify G1GC settings
By default, Apigee ships Cassandra with the G1 Garbage Collector (G1GC) and provides default G1GC parameters. Because Cassandra 5.0.X runs on Java 17, the Concurrent Mark Sweep (CMS) garbage collector (conf_jvm_options_gc_type=cms and conf_jvm_options_cms_gc_setting_lines) is no longer supported. To change the G1GC parameters, set the conf_jvm_options_g1_gc_setting_lines property in a single line with each JVM parameter separated by \n.
Example:
conf_jvm_options_g1_gc_setting_lines=-XX:+UseG1GC\n-XX:G1RSetUpdatingPauseTimePercent=5\n-XX:MaxGCPauseMillis=500\n-XX:InitiatingHeapOccupancyPercent=50\n-XX:ParallelGCThreads=8\n-XX:ConcGCThreads=8\n-XX:+ParallelRefProcEnabled\n-XX:MaxTenuringThreshold=1\n-XX:G1HeapRegionSize=32m\n-XX:G1ReservePercent=15Use your own GC settings
To ignore Apigee's presets for G1GC, set the following configuration:
conf_jvm_options_gc_type=customSpecify all GC settings for the JVM in conf_jvm_options_custom_settings, separating each setting by \n.
Example:
conf_jvm_options_gc_type=custom
conf_jvm_options_custom_settings=-XX:+UseParallelGC\n-XX:GCTimeRatio=19Configure heap sizes
Apigee strongly recommends operating Cassandra with no more than 8 GB of heap space. Checks to limit the heap size to 8 GB are in $APIGEE_ROOT/apigee-cassandra/conf/cassandra-env.sh.
To specify your own heap sizing without manually disabling checks, use the config conf_jvm_options_custom_settings. Separate each setting by \n.
Example:
conf_jvm_options_custom_settings=-Xmx8G\n-Xms8GConfigure general JVM settings
To add JVM parameters to Cassandra, specify all JVM configurations in a single line separated by \n for the config conf_jvm_options_custom_settings.
Example:
conf_jvm_options_custom_settings=-Dcassandra.start_rpc=true\n-Dcassandra.expiration_date_overflow_policy=CAP\n-XX:+FlightRecorder\n-XX:+UnlockCommercialFeaturesAppendix
How to set any Cassandra configuration
- Create or edit the Cassandra configuration override file:
vi $APIGEE_ROOT/customer/application/cassandra.properties - Add, remove, or modify the configuration line as required.
- Save the file and ensure it is owned and readable by the “apigee” user:
chown apigee:apigee $APIGEE_ROOT/customer/application/cassandra.properties - Restart the Cassandra service on the node:
apigee-service apigee-cassandra restart - Repeat these steps on each Cassandra node, one by one.
Varied types of configuration
The configuration conf_jvm_options_custom_settings can pass different parameters to the Cassandra JVM. Combine various Java parameters into a single configuration and separate by “\n”.
Example:
conf_jvm_options_custom_settings=-XX:+FlightRecorder\n-XX:+UnlockCommercialFeatures\n-Xmx8G\n-Xms8G