I have Tomcat 6.0 up and running. I went to tweak the memory sizes and realized that I have it running on the Sun JDK 1.6 client JVM. I don't have the Sun server JVM installed:
C:\>java -client -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
C:\>java -server -version
Error: no `server' JVM at `C:\appl\java\jre6u16\bin\server\jvm.dll'.
To clarify: I know how to switch JVMs in Tomcat from client to server. I just have to pick the most appropriate server JVM.
Am I going to notice a big difference between client and server JVMs? If I want the Sun server JVM, do I have to reinstall the whole JDK? Are there other free server alternatives that would be good for running Tomcat?
Here (from the Sun release notes) is the answer I was looking for, at least for how to ensure the JDK server is up and running:
Have you tried to use the file setenv.sh under TOMCAT_HOME/bin/ ? You have to manually create this file (e.g via vi) and then add you Java options. For example:
add the following line in this file:
This way your JVM should run in server mode.
Yes, you probably want the server JVM. It is tuned for server-side performance. You won't know for sure unless you go to the effort of benchmarking, but I have yet to come across anyone saying that the client VM worked better for their Tomcat setup.
As far as whether you need to download the entire JDK or not -- that I don't know, unfortunately.
-server and -client are just flags that change the performance characteristics of the normal sun JVM. If you don't specify one, the JVM guesses. In this case, it's guessing you have a client-class machine, and you just need to run java with the -server flag to change that.
See: http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html