Default JVM settings on different operating systems

Serial GC means the Serial garbage collector is chosen. Parallel GC means the Throughput garbage collector is chosen. Client means the client JIT compiler is chosen. Server means the server JIT compiler is chosen. Under (If Server Class) Default GC, JIT, and Java Heap Sizes, Client means the Client JIT compiler is chosen for a 32-bit Windows platform where other criteria for a server-class machine matched. This choice is deliberately made on 32-bit Windows platforms because historically client applications (i.e., interactive applications) are run more often on this combination of platform and operating system. Where Server is indicated, the Server JIT compiler is the only JIT compiler available in the HotSpot VM.

To print the ergonomic choices the HotSpot VM has made, the -XX: +PrintCommandLineFlags command line option can be used.

For instance, doing a simple java -XX:+PrintCommandLineFlags -version on any system with a Java 5 or Javav 6 HotSpot VM prints the default ergonomic values. The following is an example of the output produced from a Java 5 HotSpot VM on a Sun UltraSPARC 5440 system configured with 128GB of RAM and 256 virtual processors running the Oracle 11 Express 2010.11 operating system:

$ java -XX: +PrintCommandLineFlags -version
-XX:MaxHeapSize=1073741824 -XX:ParallelGCThreads=85
-XX: +PrintCommandLineFlags -XX: +UseParallelGC
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b07)
Java HotSpot(TM) Server VM (build 14.0-b15, mixed mode)

From the preceding output, the Java 6 HotSpot VM’s launcher chose the Server JIT compiler, as shown in the last line of the output, a maximum Java heap size of 1073741824 bytes, or 1024 megabytes or 1 gigabyte along with selecting the throughput collector (-XX:+UseParallelGC) with 85 parallel gc threads (-XX:ParallelGCThreads=85). Note, -XX:MaxHeapSize is the same as the command line option -Xmx.

Summary of Choices Made by a Java 5 and Later HotSpot VM

Summary of Choices Made by a Java 5 and Later HotSpot VM

Summary of Choices Made by Java 6 Update 18 and Later

Summary of Choices Made by Java 6 Update 18 and Later

 

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

3 Responses

  1. Amol Kale says:

    nice………..!

  2. Amit says:

    Very nice and useful information. Thanks for sharing.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.