JVM common startup parameters

JVM common startup parameters

-Xms: Set the minimum value of the heap.
-Xmx: Set the maximum heap size.
-Xmn: Set the size of the young generation.
-Xss: Set the stack size for each thread.
-XX:NewSize: Set the initial value of the new generation.
-XX:MaxNewSize : Set the maximum value of the new generation.
-XX:PermSize: Set the initial value of the permanent generation.
-XX:MaxPermSize: Set the maximum value of the permanent generation.
-XX:SurvivorRatio: The ratio of the size of the Eden area to the Survivor area in the young generation.
-XX:PretenureSizeThreshold: Make objects larger than this setting value directly
allocated .

Several common memory debugging tools

jps: View the status of the virtual machine process, such as process ID.
jmap: used to generate heap dump snapshot files (at a certain moment).
jhat: Analyze the generated heap dump snapshot files.
jstack: used to generate thread snapshots (at a certain moment). The main
purpose is to locate the reasons for the long-term suspension of threads (such as deadlocks, infinite loops, waiting for I/O, etc.).
By viewing the call stacks of each thread, you can know what the unresponsive thread is
doing or What resources are waiting for.
jstat: Virtual machine statistics monitoring tool. Such as showing the situation of garbage collection, the situation of
memory usage.
Jconsole: Mainly memory monitoring and thread monitoring. Memory Monitor: Can display
memory usage. Thread monitoring: This function can be used when a thread is stalled.

Guess you like

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