Customizing JVM Memory Configuration |
The iServer supports parameter settings for custom JVM memory:
Initial heap memory -Xms: Defines the heap memory size to get at initial startup. It is recommended that this value be the same as -Xmx to prevent the JVM from reallocating memory after each garbage collection.
Maximum heap memory -Xmx: Defines an upper limit on how much heap memory java will request from the operating System. If the actual memory to be used is large (when the number of services is large or the concurrency is large), it is necessary to increase the value. For example, it is recommended to increase the maximum heap memory by 50M for each additional service.
Thread stack size -Xss: Defines the stack size for each thread.
The iServer configures custom JVMs on different operating systems There are differences in memory parameter methods, as follows:
Configuring to use a custom_JVM_ memory parameter on Windows system
Configuration to uses the custom_JVM_memory parameter on Linux system
There are two ways to configure the War package to use custom JVM memory parameters: one is to modify the config file of the middleware, and the other is to configure environment variables SUPERMAP_JAVA_OPTS。
For example, when the war package is deployed in the Tomcat middleware for the Windows platform, you can configure a custom JVM memory parameters:
1.Modify the config file of the middleware.
Modification JAVA_OPTS parameters in %TOMCAT_HOME%/bin/catalina.bat :
JAVA-POTS="$JAVA-POTS -Djava. awt. less=true - Xms [initial heap memory size] - Xmx [maximum heap memory size] - Xss [heap size available for each thread]
2.By configuring the environment variable SUPERMAP_JAVA_OPTS, you can choose to -Xms, -Xmx, and -Xss .
Create a new system variable in System Properties-> Environment Variables, named SUPERMAP_JAVA_OPTS, you can select -Xms (initial heap memory size), -Xmx (maximum heap memory size), and -Xss (usable heap size per thread) for that variable value. For example, Xms512m -Xmx1024m.