JVM调优之参数介绍
jvm参数类型有3种,分别是:标准参数、-X参数(非标准参数)以及-XX参数。
1、标准参数
例如:-help、-version等
[root@node01 workspace]# java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
[root@node01 workspace]#
2、-X参数
例如:-Xint、-Xcomp、-Xmixed
[root@node01 workspace]# java -Xint -showversion Test
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, interpreted mode)
None property
[root@node01 workspace]#
Test为一个class文件,此例只为展示-X参数,具体参数用法之后会有介绍
3、-XX参数
例如:-XX:newSize、-XX:+UseSeriaIGC
[root@node01 workspace]# java -XX:+UseSerialGC -showversion Test
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
None property
[root@node01 workspace]#