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

  • 相关阅读:
    bind函数(c++11)
    谓词
    lambda表达式(c++11)
    重载运算符
    sizeof新用法(c++11)
    引用限定符(c++11)
    this指针和const成员函数
    JavaScript for循环元素取下标问题
    Hbuider sass配置 webstorm scss配置
    检测对象是否拥有某一属性
  • 原文地址:https://www.cnblogs.com/java20130722/p/3206778.html
Copyright © 2011-2022 走看看