Skip to main content
Skip table of contents

JVM heap memory configuration

The JVM heap memory configuration is done in the wrapper-safeq-cloud-server.conf file. This is a is a key configuration file used in conjunction with the application's execution wrapper. It contains various settings and parameters that govern the behavior and performance of the application.

Use the -XX:MaxRAMPercentage parameter to specify the maximum heap size for Java Virtual Machine (JVM) processes as a percentage of total system memory.

This setting is crucial for optimizing JVM performance and ensuring efficient memory utilization. See the below recommendations for configuring this parameter based on system memory usage and requirements.

Recommendations

  1. Standard Configuration:

    • Recommended Value: 70% of total system memory.
    • Use Case: Suitable for most scenarios. Provides a balance between JVM heap allocation and leaving sufficient memory for the operating system and other processes.
  2. High System Memory Usage (> 90%):

    • Recommended Action: Decrease the setting to 60% or lower.
    • Use Case: When the system's memory usage is consistently high, reducing the heap size percentage helps alleviate memory pressure and ensures smoother operation of the system.
  3. Large System Memory (> 32GB):

    • Special Consideration: When available system memory exceeds 32GB.
    • Recommended Action: Manually limit JVM heap memory to 31GB using -Xmx=31GB.
    • Reason: Prevents the disabling of compressed Ordinary Object Pointers (OOPs), which occurs when the heap size exceeds 32GB. Limiting the heap size to 31GB ensures optimal performance without compromising memory efficiency.

Configuration

Admins can also configure the maximum percentage of RAM allocated to the application using the wrapper.java.additional property. This setting is particularly useful for ensuring optimal memory utilization and preventing excessive resource consumption.

The property format is -XX:MaxRAMPercentage=<value>, and it sets the maximum percentage of RAM allocated to the Java Virtual Machine (JVM). The default value is 70.

Example configuration:

CODE
# Set the maximum percentage of RAM to 80%

wrapper.java.additional.<n>=-XX:MaxRAMPercentage=80

Replace <n> with appropriate numerical values to denote the order of additional Java options in the wrapper-safeq-cloud-server.conf file. Ensure that the numerical value (<value>) represents the desired percentage of RAM that you wish to allocate to the JVM.

  • It's essential to monitor system memory usage regularly and adjust the -XX:MaxRAMPercentage parameter accordingly to maintain optimal performance.
  • Detailed monitoring and analysis tools can help in determining the most suitable heap size configuration for specific use cases and environments.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.