This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
It pretty much has performance metrics for many different JVMs (including other languages like Visual C++).
Anyways, they have metrics for the Java/Sun JDK 1.5.0 Client and Server VM.
The server VM performance seems significantly better than client VM (looks like server is twice as fast)...and it appears anyone can switch from client to server by simply adding the "-server" in the java call (correct me if Im wrong here).
My question is...why ever use the client when the server's performance seems to be so much better?
Benchmarking Java VMs is jhard, and comparisons no less so. Take the two VMs you've mentioned here. The client is optimized for faster startup, making it nice for desktop use. It also has a larger threshold for performing HotSpot optimization tricks -- in other words, it spends more CPU time running your code, and less time speculatively compiling it. These are good choices for programs that are to be launched, run for a short time, and quit, like a desktop app, and aren't likely to be CPU-bound. The server VM, in contrast, starts up slower and spends more time doing runtime optimizations, which pays off in the long run on a server. Now, does a single speed number make sense in light of all this? No, not really.