Heap Space
JVM parameters that can be configured for the AppNode heap are minimum heap space (Xms) and maximum heap space (Xmx).
The default values for these parameters are -Xmx1024m -Xms128m. If you have to change this value you can update it using the BW_JAVA_OPTS environment variable.
For all the platforms the default heap size is 1024 MB, you can update it using the BW_JAVA_OPTS environment variable.
For
Docker:
docker run -e BW_JAVA_OPTS="-Xmx2048M -Xms2048M" -d -p <Host_ApplicationPortToExpose>:<Container_ApplicationPort> <ApplicationImageName>
For
Kubernetes or VMware Tanzu or Openshift:
applications: -name: <ApplicationName> memory: 512M path: <ArchiveName> buildpack: <BuildpackName> env: -name: BW_JAVA_OPTS value: "Xmx2048M -Xms2048M"
Note: To optimize memory usage at runtime, you can set the
MEMORY_LIMIT
environment variable to the configured memory. This variable assigns the memory to the container and it is recommended to set minimum heap size to default value and tune the maximum heap based on monitoring of memory usage and garbage collection frequency under load. It is also recommended to run baseline, scalability, and stability tests for identifying the optimum value of maximum heap size.
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.