Server VM and Client VM

Hi,

I learned ths afternoon, that there are two different JVM, a server VM and a client VM. I’ve seen some benchmarks (i know, we can make them tell what we wants…) telling that the server VM is very very faster than the client VM and even sometimes, or more than sometimes, faster than C++.
I know the “Java is slow”, is only a FUD today, but i can’t believe it easily…

If it’s true, why the server VM isn’t used by default ? I’ve read that’s because of its longe loading time and because it takes more RAM that the client vm, that’s true ?

The server VM can execute the same code than the client VM ? I ask that, because it’s a “server” vm, and you don’t play 3D games on a server very often…
For instant, for games, with a cost of a longer loading time and a few more of memory, you can have very better performances, or am i wrong ?

Thanks.

you are right, generally speaking, the server VM is faster than the client, this is because it can do optimisations that the client currenlty doesnt do. I can’t name them to be honest, but im sure someone here can.

Why do you want to user a server VM for a game? Well, because it gives you better performance in the actual game. Although yes, the actual start time for the VM is bigger than the client, it does give better performance eventually, after it has warmed up (which can take a couple of minutes).

I may be wrong, but isn’t there a plan to have just 1 VM? Or did i imagine this again? ::slight_smile:

DP

yes, some work is ongoing to support two-pahse compilation.
Short: After 1500 invokations code is compiled with the client jvm and lateron the “real” hotspots with the server-jvm.

lg Clemens

Is this currently in Java 5?

No.

Mustang?

is it reallly so hard to understand my english:

Some work is currently being done - this means it not done and curently not included anywhere.
I don’t exactly know when it will be released, but I think Dolphin but maybe Mustang could also be possible.

lg Clemnes

You’ll have to excuse me. When I got to the last 3 words I jumped for joy and everything else became meaningless.
2 phase compilation should have been included a long time ago.

Well, a problem that shows up is footprint - if you just compare the size of the client-jvm with the size of the server-jvm.
On Linux I get 7mb (server) vs. 4mb - not to mention the different data-structures etc the server-jvm needs at runtime so you get easily a +5mb footprint (since both client and server optimization-code needs to be loaded, however most jvm-code could be shared) :frowning:
Btw. the IBM-JVm already has a I think 5-phase compilation - give it a try and see what it can do for your code.

lg Clemens

To my knwoeldge it has not been released yet. I have no announceable date yet as to when it will be released.

SOrry.