How large a java brew, old and new
The new version of java (1.5) has sen many improvements. One of which is the performance has increased. A side effect of this was noting that a java app I use was using some amount of memory. The new jvm is getting smart, seeing that it was running on a nice machine (4 cpus and 2GB memory) it decided to itself to run in server mode. Fine, this helps performance. Not so fine if the machine happens to be a server for a few hundred people and a couple of dozen of thos people use this same app. You can see where this is going, the jvm's eat up the memory, leaving little for anything else.
Now the java app it self is launched via java webstart. It can be launched from a webbrowser pointing to a JNLP page/file. From the command line it can be launched as:
javaws http://location.domain/url/to/the/file.jnlp
One of the entries in this JNLP file is
< j2se version="1.4+" java-vm-args="-esa -Xnoclassgc"/>
Fine, we can control how the JVM is run.
Now getting back to my memory thing. A java app, using a large amount of memory on a machine with a nice bit of memory but that memory can get used up fast once a few java apps get launched. Heres the trick:
< j2se version="1.4+" java-vm-args="-client"/>
It runs the JVM in client mode, thus using less memory. Over half the memory in the case of the java app I was using. Its a nice trick I thought.
Posted at 11:00PM Aug 03, 2004 by smg in General |