Java Virtual Machine (three) - JVM tuning

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/QQ2899349953/article/details/97250888

Be finishing ...

Parameter setting:
setting parameters in two forms:
the current JVM instance settings;
set up all JVM instance, in the global configuration file * .vm

Set the heap:
minimum -Xms20M the heap memory capacity of 20M, must be in units of M
-Xmx20M the heap memory capacity of 20M maximum

-XX: PermSize = 10M stack disposed permanent generation capacity, must be in units of M
-XX: MaxPermSize = 20M disposed maximum capacity of the permanent generation 20M
-Xmn10 set size of the young generation 1OM
-XX: Young NewRatio provided. 4 = Generation and old age ratio is 1:. 4
-XX: SurvivorRatio = 8 provided a Survivor and Eden area ratio is 1: 8

Stack Set:
-Xss128k 128k virtual machine is provided for the stack size
-Xoss128k native method stack size is provided;

Provided garbage collector:
-XX: + UseG1GC garbage collector is disposed G1 collector
-Xx: PrintGCDetalls print detailed operation of GC

Multiple parameters empty spaces open;

Java JDK command provided by
Java command exists in the jdk / bin

javac compile
java run
javap disassemble
jps shows the current Java process pid command
jstack Java virtual machine comes with a stack trace tool for analyzing JVM thread snapshot of the current time, is a snapshot of
current methods of each JVM thread running stack collection;
jmap users to print the specified Java process shared object memory maps or heap memory details, see the Java heap usage

Guess you like

Origin blog.csdn.net/QQ2899349953/article/details/97250888