Java Ergonomics and JVM Flags
Java Virtual Machine can tune itself depending on the environment and this smart tuning is referred to as Ergonomics . When tuning Java , it's important to know which values were used as default for Garbage collector, Heap Sizes, Runtime Compiler by Java Ergonomics There are many JVM command line flags. So, how do we find out which JVM flags are used? It turns out that JVM has flags to print flags. :) I tested following commands with Java 8. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid $ uname -a Linux isurup-ThinkPad-T530 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Printing Command Line Flags We can use "-XX:+PrintCommandLineFlags" to print the command line flags used by the JVM. This is a useful flag to see the values selected by Java Ergonomics. $ java -XX:+PrintCommandLineFlags -version -XX:InitialHeapSize=...