Java Memory Management

Establishing Java Virtual Memory Settings

Your application server provides options to establish the amount of memory set aside for the Java virtual machine; that is, the amount of memory that the Java environment itself manages in order to run the application server itself and the ARCHIBUS Web Central application.

For instance, with Tomcat, you can use the Start/Apache Tomcat 5.0/Configure Tomcat option, select the "Java VM" tab, and at the end of the "Java Options" preference append the memory switches for the Java virtual machine. If you are using Jetty, the memory switches used when running as a console are specified in c:\Program Files\archibus\xx\SmartClient\SmartClient.Common.dll.config and when running as a service they are specified in the initmemory and maxmemory preferences in \WEB-INF\config\jetty-service.conf.

Common Switches

The two most common switches to use are "-Xms" and "-Xmx":

Some guidelines for using these switches are:

Scalability Recommendations

SET JAVA_OPTS=-Xmx4000m -Xms4000m -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=16 –server

These benchmarks found best results using mark and sweep for long-lived (old generation) objects and parallel GC for short-lived (new-generation or Eden space) objects. This recommendation is consistent with Sun’s recommendation for obtaining minimum user delay. An exception is smaller servers, such as 2-core servers, often do better with the parallel collection for long-lived objects rather than with the mark-and-sweep collection. And single-processor servers do not benefit from parallel garbage collection.