Jump to content
  • Advertisement
Sign in to follow this  
The Rug

[java] "java -server" performance boost

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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..

Share this post


Link to post
Share on other sites
Because it takes far longer to get going, that's why... no good for little client apps.

Next release of Java will apparently combine the two VMs into a single two-stage compiler giving us the best of both.

Cas :)

Share this post


Link to post
Share on other sites
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%)

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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)?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!