[Java Application Performance and Memory Management] Chapter 10 – Tuning JVM Memory Settings

Published by

on

For tuning JVM settings, we can use below flags

  • -XX:+PrintStringTableStatistics, -XX:StringTableSize=n
  • -XX:MaxHeapSize=n (same as -Xmxng),
    -XX:InitialHeapSize=n (same as -Xmsng)
    • Updating the heap size with these flags by like java .. -Xmx1g will enable to set up the Heap size.
  • -XX:+UnlockDiagnosticVMOptions
  • -XX:+PrintFlagsFinal
    • Print all the possible flags
  • -XX:+PrintCommandLineFlags
    • Print JVM default values

Reference

Leave a comment