Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1330975884
Content column
id1330975895
Content block
id1330975883

On this page:

Table of Contents
maxLevel4
minLevel2

Content block
id1330975894

This page provides instructions for changing the Java heap space (Xmx) for both Cassandra and TWCloud on Linux and Windows, respectively.

...

Configuring Java heap space for Cassandra

On Linux

To configure Java heap space for Cassandra on Linux, you must set

...

the

...

variables MAX_HEAP_SIZE and

...

 HEAP_NEWSIZE which are commented by default in the file cassandra-env.sh. The location of the file cassandra-env.sh depends on the type of Cassandra installation.

  • Package installation: /etc/cassandra/cassandra-env.sh
  • Tarball installation: <Cassandra install folder>/conf/cassandra-env.sh

Uncomment MAX_HEAP_SIZE, HEAP_NEWSIZE variables and adjust MAX_HEAP_SIZE manually. Otherwise, Cassandra will calculate the heap size based on the system's memory using the following formula:

Code Block
languagetext
titleCalculating Java heap size
max(min (1/2 ram), 1024MB), min(1/4 ram, 8GB))

The formula details are outlined below:

  • For the system memory 0-2 GB: use half of it.
  • For the system memory 2-4 GB: use 1 GB.
  • For the system memory 4-32 GB: use a quarter of it.
  • For the system memory more than 32 GB: use 8 GB.

On Windows

We recommend setting the min (-Xms) and max (-Xmx) heap to the same value in the Cassandra document to avoid pausing the GC during resizing.


To change the value using the Registry Editor


1. Run regedit from the command line
2. Browse for the key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\cassandra\Parameters\Java.
3. Right-click Options and select Modify.... You can then change the min and max heap size from -Xms and -Xmx

Configuring Java heap space for TWCloud

On Linux

  • If you start TWCloud from the executable file twcloud, you can configure the -Xmx parameter from the file jvm.

...

  • options (located in the same folder).

On Windows

  • If you start TWCloud from the executable file twcloud.exe, you can configure the -Xmx parameter from the file jvm.

...

  • options (located in the same folder).
  • If you start TWCloud from a Windows service, you must use the Registry Editor to update the value.


To change the value using the Registry Editor


1. Run regedit from the command line.
2. Browse for the key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\Teamwork Cloud\Parameters\Java.
3. Right-click JvmMx and select Modify....
4. Select Base to Decimal and change the value. The value is in megabytes (mb).

Configuring Java heap space for WebApp

Heap space for WebApp is handled by Tomcat.

On Linux

  • Heap settings are located in

...

  • <install_root>/WebAppPlatform/bin/setenv.sh
    JVM_OPTS="-server  -XX:+UseParallelGC  -Xms4096M -Xmx8192M"

On Windows

  • The heap setting for WebApp is located in the registry


To change the value using the Registry Editor


1. Run regedit from the command line.
2. Browse for the key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\WebApp\Parameters\Java.
3. Right-click JvmMx and select Modify....
4. Select Base to Decimal and change the value. The value is in megabytes (mb).