Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] "java -server" performance boost

Started by The Rug Aug 29, 2005 at 6:34 PM 5 replies 3.8k views
Original Post
The Rug
The Rug
Simple question? Maybe... I've just found that using the "-server" command line parameter when invoking Java almost doubles my application's performance in some situations. The snag is that the JRE for Windows doesn't actually include the Server JVM, only the client. The Server JVM comes with the JDK, and is simply an alternative jvm.dll in the folder JDKxxx/jre/bin/server. Unfortunately, I can't realisticly expect the end-users of my app to download and install the JDK then copy the relevant file into their JRE. I want my app to perform as well as possible, but I'm pretty sure I can't distribute the alternative jvm.dll with my app without pissing Sun off. Distributing the entire JDK is out of the question. Can anyone offer me any advice here? Does anyone know why the Server JVM isn't distributed with the JRE, when in certain situations it gives a clear performance advantage? Is the Server JVM likely to be distributed with the JRE in future (as far as I'm aware this is already the case with the Solaris version)? Is there anything I can do (tweaking command line paramteres, etc.) to get myself a similar performance increase? Cheers to anyone who can help.
the rug - funpowered.com
World69star
World69star
I here is a link to an article on it(after the Java vs. C++ benchmark at the end):
http://java.sys-con.com/read/45250.htm

I have the server jvm is in the 1.5j2se jre

I switched the line order -server and -client in the textfile like the article says and see a big speed increase in everything!

Why they don't just use that jvm, I don't know? I also noticed that that JVM is larger in size then the client..hmm..
The Rug
The Rug
Thanks guys.

Quote:
I have the server jvm is in the 1.5j2se jre

Are you sure? I downloaded the JRE, and it isn't there... as I said, I had to copy the .dll from my JDK install into the JRE.

Princec: That's good news! Do you have a source for this? (Just to be 100%)
the rug - funpowered.com
princec
princec
The server VM is not included in j2se 5.0 on Windows - you are free to distribute it from the JDK however.

Haven't got a 100% source on 2-stage compilation - just piecing together info from Ken Russell and Azeem Jiva on the javagaming.org forums.

Cas :)
The Rug
The Rug
Quote:

The server VM is not included in j2se 5.0 on Windows - you are free to distribute it from the JDK however.

As in, I could take it from the JDK and bundle it with the JRE and my app (using a custom installer)?
the rug - funpowered.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.