Java program performance optimization - JVM memory allocation parameters

Main JVM memory parameters:

-Xms: Set the initial heap size when the Java application starts

-Xmx: Set the maximum heap size that a Java application can get

-Xss: Set thread stack size

-XX:MinHeapFreeRatio: Set the minimum free ratio of heap space. When the free memory of the heap space is less than this value, the JVM will expand the heap space

-XX:MaxHeapFreeRatio: Set the maximum free ratio of heap space. When the free memory of the heap space is greater than this value, the JVM will compress the heap space

-XX:NewSize: Set the new generation size

-XX:NewRatio: Set the ratio of the old generation to the new generation

-XX:SurviorRatio: Set the ratio of the eden area to the survivor area in the new generation

-XX:PermSize: Set the initial permanent generation size

-XX:MaxPermSize: Set the maximum permanent generation size

-XX:TargetSurvivorRatio: Set the available ratio of survivor area. When the space usage of the survivor area reaches this value, the object will be sent to the old age



 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326184999&siteId=291194637