JVM tuning practice sharing


The server that I bought and played
, and the personal blog built by the source code pulled from github.
I forgot to take notes due to the optimization of GC before. I am
afraid
forgetting.

View original information

java -version

insert image description here

java -XX:+PrintCommandLineFlags -version

insert image description here

ps -ef|grep java
kill -9  [pid]

insert image description here

restart the project

nohup java -XX:+UseG1GC -jar -Djava.awt.headless=true  blog.jar -start & echo $!

insert image description here
nohup is running in the background
-XX:+UseG1GC set non-standard parameter G1 receiver
-Djava.awt.headless=true ignore jdk 32 or 64 bit

It shows that G1 has been started

insert image description here
Use jinfo -flags pid or jinfo pid or jmap -heap pid to view

jinfo -flags [pid]
jinfo [pid]
jmap -heap [pid]

insert image description here

insert image description here