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 and server two 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. Default heap capacity under Client -xms1m-xmx64m
Server run mode , for servers application. Default heap capacity under Server -xms128m-xmx1024m
View the default operating 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
Respect the original, reprint please indicate from: http://www.cnblogs.com/fsjohnhuang/p/4270505.html ^_^ Fat Boy John
Java Magic Hall: JVM's operating mode