JVM Study

List all VM flags

java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version

JAVA_OPTS settings for OpenJDK 11

File: d:\App\wildfly-10.1.0.Final\bin\standalone.conf.bat

1
2
set "JAVA_OPTS=%JAVA_OPTS% -Dhk.gov.ogcio.egis.rm.common.PROPERTIES_FILEPATH=D:\rm -Djboss.bind.address=0.0.0.0 -Dspring.profiles.active=uat -Djavax.net.ssl.trustStore=D:\keystore\psct_egis.jks -Dfreetts.voices=de.dfki.lt.freetts.en.us.MbrolaVoiceDirectory -Dmbrola.base=D:\mbrola"
set "JAVA_OPTS=%JAVA_OPTS% -XX:MaxGCPauseMillis=500 -XX:ErrorFile=D:/log/hserrpid%p.log -XX:HeapDumpPath=D:/log/ -Xloggc:D:/log/gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError"

Profiling commands

1
2
3
4
jinfo <pid>

jmap -dump:live,format=b,file=heap.bin <pid>
jstack <pid>

Reference

http://stas-blogspot.blogspot.com/2011/07/most-complete-list-of-xx-options-for.html
https://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#Options
https://stackoverflow.com/questions/43087831/complete-list-of-jvm-options
https://my.oschina.net/u/3627055/blog/2995973