Configuring JVM Parameters
You can configure the JVM in the hazelcast
container using the jvm
field of the CRD spec.
Configuring a JVM Parameter
Use any of the following configuration options in the Hazelcast
resource. For more information, see the API Reference.
Field | Description |
---|---|
|
Configures the initial heap size of the Hazelcast process as a percentage of the total memory of a container. |
|
Sets the maximum heap size for a JVM running with a large amount of memory. |
|
Unlike its name, this parameter sets the maximum heap size for a JVM running with a small amount of memory. |
Example Configuration
The following Hazelcast
custom resource creates a cluster that uses all three parameters.
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
jvm:
memory:
initialRAMPercentage: "10"
maxRAMPercentage: "20"
minRAMPercentage: "10"
GC Parameters
Enabling Logging
To enable Garbage Collector Logging, you can use the following configuration:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
jvm:
gc:
logging: enabled
It is going to set the following JVM argument: -verbose:gc
Setting the Garbage Collector
Before making Garbage Collector related changes using the Hazelcast Platform Operator, it is highly recommended to read Garbage Collector Considerations section of Capacity Planning Document to decide which Garbage Collector to use. |
To set the Garbage Collector, following configuration can be used:
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
jvm:
gc:
collector: <collector>
<collector>
can be replaced with the following options:
<collector> |
JVM Equivalent |
---|---|
|
|
|
|
|
|