Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/mwexler/public_html/tp/textpattern/lib/txplib_db.php on line 14
The Net Takeaway: Server vs. Client VM


Danny Flamberg's Blog
Danny has been marketing for a while, and his articles and work reflect great understanding of data driven marketing.

Eric Peterson the Demystifier
Eric gets metrics, analytics, interactive, and the real world. His advice is worth taking...

Geeking with Greg
Greg Linden created Amazon's recommendation system, so imagine what can write about...

Ned Batchelder's Blog
Ned just finds and writes interesting things. I don't know how he does it.

R at LoyaltyMatrix
Jim Porzak tells of his real-life use of R for marketing analysis.







Server vs. Client VM · 09/07/2004 01:26 PM, Tech

When one installs the Java runtime from, one gets a JVM ready to roll. However, it turns out that you get the "client" VM. Many of the apps I like to run (and the kind I bet you like to run as well) would benefit from the enhancements of the "server" VM.

However, this is not installed by default from the site, though some apps ship with it. Where would one get it?

It turns out to be part of the JDK, the Java Development Kit. This is also called the SDK, and is available at the J2SE site. Note that depending on your app, you may also want to play with the J2EE SDK.

What is the difference? Well, the Server JVM takes longer to start up, and it takes much more memory, both initially and during program runs. The advantages, however, are that you get more runtime optimization. Since CPU and memory are relatively cheap these days, it probably makes sense to run all your java "tools" using the Server JVM.

How to make sure you are using it? Well, one way is to run "java -server -jar app.jar" or whatever; "-client" will run the default client one. However, if you want to change the default from client to server, you can edit the "jvm.cfg" file. This is usually at
C:\Program Files\Java\j2reXXX\lib\i386 on Windows, and
/usr/java/j2reXXX/lib/i386/ on Linux. Usually it will have two lines:
-client KNOWN
-server KNOWN
Swap the order and resave.
-server KNOWN
-client KNOWN

Do I already have the Server VM? One way to test is to just run "java -server". My test machine said "Error: no `server' JVM at `C:\Program Files\Java\j2re1.4.2_04\bin\server\jvm.dll'"

How to install it? Simply make a jre\bin\server\directory, and copy the correct jvm.dll into it. You may also have to make the config file changes above. Or, install the whole JDK and that should give you access to it as well.

If you want the techie details around why the Server side is so different, check out this Hotspot White Paper

Finall, some other tips for making the JVM stuff run more smoothly.

In the old days, you would change autoexec.bat to change the path and add environment variables. Nowadays, you right click on My Computer, Properties, and then Advanced, Environment Variables. You can still muck with the autoexec.bat... but I wouldn't.

* * *


  Textile Help
Please note that your email will be obfuscated via entities, so its ok to put a real one if you feel like it...

powered by Textpattern 4.0.4 (r1956)