Cassandra Installation with Helm

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

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.