Naresh said:
What is the difference between client, server, classic and hotspot jvms?
IIRC, the names "classic" and "hotspot" were introduced (in 1.3??) when the
Hotspot JIT-ing technology was first introduced. Hotspot is a collection of
advanced runtime compilation techniques that, by focussing on the code that
actually runs most often while largely ignoring the rest, are able to use more
advanced optimisations than the old-fashioned, "classic", JIT-er which just
compiled all classes into machine-code without feedback from the runtime.
Because "classic" compiled everything in the same way, there was more pressure
to avoid optimisation that were slow to compute, since they'd be applied
everywhere rather than just where they were needed.
When "hotspot" came out, the previous JIT-er (derived from the Symantek one, I
seem to recall) was renamed "classic".
These names are, of course, ludicrous -- we shouldn't be telling the runtime
what technology we want it to use, but should be telling it what we are going
to do, and let *it* choose the technology. Hence Sun also introduced (I can't
remember if it was at the same time) the "server" and "client" names. As Roedy
has said, the "server" version is intended for applications where startup time
is not important, but heavy-duty optimisation is; whereas the "client" version
is the reverse.
As I understand it, in the current 1.4 from Sun, both "client" and "server" use
Hotspot technology, but differ in the way they are tuned -- the server version
invokes the hotspot optimiser much more readily and makes it work harder (E.g.
in one benchmark I ran, the server version was able to see that the benchmark
result was not used, and optimised all the code away completely, whereas the
"client" version never did reach that level of optimisation, even after the
benchmark had looped several times). I think they also differ in how the
memory allocation/GC algorithms are tuned.
The "classic" and "hotspot" names are now deprecated.
BTW, all these names correspond to different JVM DLLs on Windows (and I assume
that something similar happens in other environments), and other vendors name
their DLLs according to different schemes. That can cause something of a
nuisance if you are running software on a non-Sun JVM if the launcher for that
s/w was coded on the assumption of the Sun naming scheme.
-- chris