Cassandra Installation with Helm: Difference between revisions
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* https:// | * https://artifacthub.io/packages/helm/bitnami/cassandra | ||
* https://hub.docker.com/_/cassandra | * https://hub.docker.com/_/cassandra | ||
Line 7: | Line 7: | ||
* [[Cassandra Installation#Installation_with_Helm|Cassandra Installation]] | * [[Cassandra Installation#Installation_with_Helm|Cassandra Installation]] | ||
* [[Third Party Helm Charts#Charts|Third Party Helm Charts]] | * [[Third Party Helm Charts#Charts|Third Party Helm Charts]] | ||
=Overview= | |||
This article refers to the bitnami Cassandra chart. | |||
<syntaxhighlight lang='bash'> | |||
helm repo add bitnami https://charts.bitnami.com/bitnami | |||
helm install my-release bitnami/cassandra | |||
</syntaxhighlight> | |||
=Configuration= | |||
==JVM Heap Parameters== | |||
Java heap parameters (-Xmx, -Xms and -Xmn) are controlled for both the main cassandra process and for nodetool process (which is used by the liveness probe, and thus, is important to work well) by three environment variables: | |||
* JVM_OPTS | |||
* MAX_HEAP_SIZE | |||
* HEAP_NEWSIZE | |||
While it is possible to set | |||
<syntaxhighlight lang='bash'> | |||
JVM_OPTS="-Xmx=2G -Xms=2G -Xmn=1G" | |||
</syntaxhighlight> | |||
if you do so, you must also keep the values of MAX_HEAP_SIZE and HEAP_NEWSIZE synchronized, otherwise clashing combinations of values may materialize for the cassandra or nodetool processes, and they may fail. | |||
The best way to set the heap related values is to use MAX_HEAP_SIZE and HEAP_NEWSIZE. | |||
Add the following to the configuration overlay: | |||
<syntaxhighlight lang='yaml'> | |||
extraEnvVars: | |||
- name: MAX_HEAP_SIZE | |||
value: '4G' | |||
- name: HEAP_NEWSIZE | |||
value: '1G' | |||
</syntaxhighlight> | |||
The values defined here will take precedence and will override the values calculated by the startup scripts. | |||
If MAX_HEAP_SIZE is set, cassandra startup script will automatically adjust the -Xms to the same value. |
Latest revision as of 02:27, 12 January 2021
External
Internal
Overview
This article refers to the bitnami Cassandra chart.
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/cassandra
Configuration
JVM Heap Parameters
Java heap parameters (-Xmx, -Xms and -Xmn) are controlled for both the main cassandra process and for nodetool process (which is used by the liveness probe, and thus, is important to work well) by three environment variables:
- JVM_OPTS
- MAX_HEAP_SIZE
- HEAP_NEWSIZE
While it is possible to set
JVM_OPTS="-Xmx=2G -Xms=2G -Xmn=1G"
if you do so, you must also keep the values of MAX_HEAP_SIZE and HEAP_NEWSIZE synchronized, otherwise clashing combinations of values may materialize for the cassandra or nodetool processes, and they may fail.
The best way to set the heap related values is to use MAX_HEAP_SIZE and HEAP_NEWSIZE.
Add the following to the configuration overlay:
extraEnvVars:
- name: MAX_HEAP_SIZE
value: '4G'
- name: HEAP_NEWSIZE
value: '1G'
The values defined here will take precedence and will override the values calculated by the startup scripts.
If MAX_HEAP_SIZE is set, cassandra startup script will automatically adjust the -Xms to the same value.