Photo by Standsome Worklifestyle on Unsplash

Java application performance management

Code compilation

java -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation <class name>

How is memory organized?

Memory settings

-XX:PermSize=n
-XX:MaxPermSize=n
-XX:InitialHeapSize=n   (alternative -Xms)
-XX:MaxHeapSize=n (alternative -Xmx)
-XX:+HeapDumpOnOutOfMemoryException
-XX:HeapDumpPath=/path/to/file

Garbage collector tuning

-verbose:gc
-XX:-UseAdaptiveSizePolicy
-XX:NewRatio=n
-XX:SurvivorRatio=n
-XX:MaxTenuringThreshold=n
-XX:+UseSerialGC
-XX:+UseParallelGC
-XX:+UseConcMarkSweepGC
-XX:+UseG1GC

Assessing performance

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store