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

  • 相关阅读:
    CSS中可以通过哪些属性定义,使得一个DOM元素不显示在浏览器可视范围内?
    贝塞尔曲线
    A little composer
    ABAQUS操作笔记
    ABAQUS薄板实例
    引用
    引用、重载、递归概念及应用
    Photoshop图片处理-云毕业照
    图片存储大小更改
    论文公式之“公式居中,序号在右”
  • 原文地址:https://www.cnblogs.com/java20130722/p/3206778.html
Copyright © 2011-2022 走看看