There are 2 compiler options available in JVM. These are
essentially two different compilers interfacing the same runtime system.
The types of Hot Spot JVM flavors are
classic:
disables the Hotspot JIT compiler.
Client
(default): activates the Hotspot JIT for "client" applications. The
client system is optimal for applications which need fast startup and small
footprints.
Server:
activates the "server" Hotspot JIT: it requires a fair amount of time
to warm up, but delivers best performance for server. The server JVM uses a
larger default size for the heap, a parallel GC and optimizes code aggressively
at runtime.
Don't forget that, if you use them, -server or -client must be
the first argument passed to Java.
Version
It is very important to know the java
installation and which type of JVM is used when our code is being executed.
This can be obtained using the “java –version” command but there is much
more to learn from the output of the command,
$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build
1.6.0_24-b07)
Java HotSpot(TM) Client VM (build
19.1-b02, mixed mode)
|
The output shows the Java version number (1.6.0_24) and the
exact build ID of the JRE used (1.6.0_24-b07). We also see the name (HotSpot),
the type (Client) and the build ID (19.1-b02) of the JVM.
$ java –version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build
1.6.0_24-b07)
Java HotSpot(TM) Client VM (build
19.1-b02, mixed mode, sharing)
|
In the above about the version is same but we can see another
field call “sharing”.
The JVM in the above outputs runs in mixed mode. This mode of
execution is the default mode of HotSpot and means that the JVM dynamically
compiles byte code into native code at run time.
The Sharing element tells us that class data sharing is enabled.
Class data sharing is an approach that stores the system classes of the JRE in
a readonly cache (in a jsa file, “Java Shared Archive”) which is used as a
shared resource by the classloader of all Java processes. Class data sharing
may be beneficial to performance when compared to reading all the class data
from jar archives over and over again.
Are you trying to earn cash from your websites/blogs by using popup ads?
ReplyDeleteIn case you do, did you take a look at Propeller Ads?