9.3. Memory Settings for the Enterprise Web Platform

The optimal memory settings for an application server are highly dependent on the exact applications used, the number of users, the virtual or physical host upon which the installation resides, and other services running on that host.
The Enterprise Web Platform ships with default values for initial and maximum heap allocations by the JVM. These values are:
  • -Xms1303m: Initial heap size, set in megabytes
  • -Xmx1303m: Maximum heap size, set in megabytes
Guidelines for memory settings for the Enterprise Web Platform:
  • Allocate the same values for initial and maximum heap sizes
  • Use values smaller than the host's allocatable memory
  • Be aware of other services and applications running on the host, and allow for their usage of memory
Fine tuning the memory settings beyond these guidelines requires production-like load testing and analysis of memory usage logs, and is highly variable between installations and applications used with the Enterprise Web Platform.

Procedure 9.5. Changing Memory Settings for the Enterprise Web Platform on Linux

  1. Navigate to JBOSS_DIST/jboss-as/bin.
  2. Using a text editor, open run.conf.
  3. The memory options are set on this line:
    JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
    
    Edit the line to include the new initial and maxium heap sizes for the JVM:
    JAVA_OPTS="-XmsINITIAL_HEAP_SIZEm -XmxMAX_HEAP_SIZEm -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
    
  4. The new settings will take effect when the Enterprise Web Platform is shut down and restarted.

Procedure 9.6. Changing Memory Settings for the Enterprise Web Platform on Windows

  1. Navigate to JBOSS_DIST\jboss-as\bin.
  2. Using a text editor, open run.conf.bat.
  3. The memory options are set on this line:
    set "JAVA_OPTS=-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true
                   -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
                   -Dsun.lang.ClassLoader.allowArraySyntax=true"
    
    Edit the line to include the new initial and maxium heap sizes for the JVM:
    set "JAVA_OPTS=-XmsINITIAL_HEAP_SIZEm -XmxMAX_HEAP_SIZEm -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
    
  4. The new settings will take effect when the Enterprise Web Platform is shut down and restarted.