Configuring the OpsCenter JVM
The OpsCenter JVM has been tuned to handle both large and small clusters with initial memory and garbage collection JVM parameters. These default values should be sufficient for most users. However, certain scenarios can arise that might require users to further tune these parameters.
Locate the opscenterd.log
file. The location of this file depends on the type of installation:
-
Package installations: /var/log/opscenter/opscenterd.log
-
Tarball installations: install_location/log/opscenterd.log
There is an environmental variable OPSC_JVM_OPTS
that can be set to override the default parameters.
Here are some parameters you might consider tuning:
-
-Xmx
: The maximum amount of heap space available foropscenterd
to use. This default is2048m
(2GB), which should be enough for most installations. If you are managing multiple clusters or otherwise see OutOfMemory errors inopscenterd.log
, try doubling the heap to4096m
(4GB). If memory-related issues continue, please contact DataStax Support for assistance. -
-Xms
: The initial amount of heap space that theopscenterd
process uses on startup. Lower this value ifopscenterd
is having trouble starting. -
Garbage Collection parameters for Java are not recommended for modification. However, if there is a need to modify and tune other garbage collection parameters, follow this guide https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/ for Java 8 and https://docs.oracle.com/javase/9/gctuning/introduction-garbage-collection-tuning.htm for Java 9.
-
-Djava.io.tmpdir=/path/to/dir
: The directory that Jython uses to load and execute dynamic classes (default is the systemtmp
directory). Change this to another directory if you are having trouble loading OpsCenter due to permissions on the default directory.
To modify these parameters, you can simply set the environment variable OPSC_JVM_OPTS
prior to starting OpsCenter.
If OpsCenter is running while these parameters are set, a restart is required. |
Updating maximum heap size JVM argument:
export OPSC_JVM_OPTS=-Xmx4096m
sudo service opscenterd restart
Depending on the Java implementation in use, the
|