Java Magic Hall: JVM's operating mode

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.