zoukankan      html  css  js  c++  java
  • Real differences between “java -server” and “java -client”-JVM Server和JVM Client的不同

    This is really linked to HotSpot and the default option values (Java HotSpot VM Options) which differ between client and server configuration.

    From Chapter 2 of the whitepaper (The Java HotSpot Performance Engine Architecture):

    The JDK includes two flavors of the VM -- a client-side offering, and a VM tuned for server applications. These two solutions share the Java HotSpot runtime environment code base, but use different compilers that are suited to the distinctly unique performance characteristics of clients and servers. These differences include the compilation inlining policy and heap defaults.

    Although the Server and the Client VMs are similar, the Server VM has been specially tuned to maximize peak operating speed. It is intended for executing long-running server applications, which need the fastest possible operating speed more than a fast start-up time or smaller runtime memory footprint.

    The Client VM compiler serves as an upgrade for both the Classic VM and the just-in-time (JIT) compilers used by previous versions of the JDK. The Client VM offers improved run time performance for applications and applets. The Java HotSpot Client VM has been specially tuned to reduce application start-up time and memory footprint, making it particularly well suited for client environments. In general, the client system is better for GUIs.

    So the real difference is also on the compiler level:

    The Client VM compiler does not try to execute many of the more complex optimizations performed by the compiler in the Server VM, but in exchange, it requires less time to analyze and compile a piece of code. This means the Client VM can start up faster and requires a smaller memory footprint.

    The Server VM contains an advanced adaptive compiler that supports many of the same types of optimizations performed by optimizing C++ compilers, as well as some optimizations that cannot be done by traditional compilers, such as aggressive inlining across virtual method invocations. This is a competitive and performance advantage over static compilers. Adaptive optimization technology is very flexible in its approach, and typically outperforms even advanced static analysis and compilation techniques.

    Note: The release of jdk6 update 10 (see Update Release Notes:Changes in 1.6.0_10) tried to improve startup time, but for a different reason than the hotspot options, being packaged differently with a much smaller kernel.


    转自http://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client

  • 相关阅读:
    MySql控制台命令
    MySql笔记
    Unity打包android时会出的一些问题
    Unity3D2017.3.0基于Vuforia 开发AR流程(1)
    基于Unity开发广州幻境的Handy结合HTC Tracker的开发坑
    基于Unity 关于SteamVR中 手柄/Tracker不显示的问题
    使用Socket对序列化数据进行传输(基于C#)
    7. 整数反转
    6. Z 字形变换
    53. 最大子序和
  • 原文地址:https://www.cnblogs.com/java20130722/p/3206778.html
Copyright © 2011-2022 走看看