First, preface
The JVM has both client and server two operating modes. Different patterns correspond to different scenarios, and the JVM is optimized accordingly. This article will record information about the JVM pattern for later review.
Second, Introduction
There are client directories under $java_home/jre/bin, which represent two operating modes of the JVM, respectively. client run mode , for desktop applications, loads faster than server mode by 10%, and runs at a speed of 10 of the server mode. The default heap capacity under Client is -xms1m-xmx64m server run mode for server applications. The default heap capacity under Server -xms128m-xmx1024m View the default run mode of the JVM through Java-version.
View the client run mode environment of the JVM through Java-client-version.
View the server run-mode environment for the JVM through Java-server-version.
Three, mode switch
1. Temporary switchover
Explicitly specify the run mode when starting the JVM, such as: Running in server mode Com.cnblogs.fsjohnhuang.master.Daemon
$ java-server Com.cnblogs.fsjohnhuang.master.Daemon
2. Permanently switch
Modify the Java_home/jre/lib/i386/jvm.cfg file. Jvm.cfg File Original content:
-client known-server Known-hotspot aliased_to-client-Classic warn-native Error-green ERROR
Modify to enable server mode as the default JVM run mode
-Server known-client known-hotspot aliased_to-client-Classic warn- native Error-green Erro
Http://www.cnblogs.com/fsjohnhuang/p/4270505.html
Java Magic Hall: JVM operating mode (RPM)