Sun's JVM comes in two flavors: -client
and -server
, where the Server VM is supposed to be optimized for long running processes, and is recommended for server applications.
When I run java
with no parameters, it displays the usage options, which includes the following text:
The default VM is server, because you are running on a server-class machine.
Having seen this, I didn't bother to add the -server
to the process startup command.
However, on a recent JVM crash log, I noticed the following line near the end of the file:
vm_info: Java HotSpot(TM) Client VM (14.0-b16) for linux-x86 JRE (1.6.0_14-b08), built on May 21 2009 02:01:47 by "java_re" with gcc 3.2.1-7a (J2SE release)
It seems to me that Java is using the Client VM, despite what it says in the help message. I'm going to add the -server
option to my startup command, but now I'm suspicious. So my question is: is there a way to make sure that the VM I'm running in is really the Server VM, without resorting to forcing a JVM crash?
The OS is ubuntu 8.04, but I'm using JDK 1.6.0_14 which I downloaded from Sun's website.