Why Server If It’s Not a Server?

Have you ever wondered why when you type java -version, you usually get something like that:

java version "1.8.0_131"

Java(TM) SE Runtime Environment (build 1.8.0_131-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

 

Why Server VM?

For JVM, some machines are considered to be “client-class” and some are “server-class”.

If the given machine is classified as “server-class”, then HotSpot Server VM will be used. For “client-class”, it’s going to be HotSpot Client VM.

Type of HotSpot determines which type of JIT compiler, and which GC will be used at runtime by default. Because of that, the Server VM starts up more slowly than the Client VM, but over time runs more quickly.

 

 

To check whether the machine is a “client-class” or a “server-class”, you can have a look at the following (a little bit simplified) rules:

 

 CPU with one coreCPU with multiple cores
32-bit JVM on Windowsclientclient
32-bit JVM on non-Windows systemclientserver

64-bit JVM on any system
serverserver

Leave a Reply

Your email address will not be published. Required fields are marked *