5.2. Memory Settings for the Enterprise Application Platform

The optimal memory settings for an application server depend on the deployed applications, the number of users, the virtual or physical host upon which the installation resides, and services running on the host.
The Enterprise Application Platform ships with the following default values for initial and maximum heap allocations by the JVM:
  • -Xms1303m: initial heap size in megabytes
  • -Xmx1303m: maximum heap size in megabytes
Follow the guidelines below when defining memory settings:
  • 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 can vary dramatically between installations and applications used with the JBoss Enterprise Application Platform.

Procedure 5.5. Changing Memory Settings for the Enterprise Application Platform on Linux

  1. Navigate to $JBOSS_HOME/jboss-as/bin.
  2. Open run.conf for editing.
  3. Locate the line with the memory options:
    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"
  4. Edit the line to include the new initial and maximum heap sizes for the JVM:
    JAVA_OPTS="-XmsINITIAL_HEAP_SIZE -XmxMAX_HEAP_SIZE -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"
  5. If the server is runnning, restart it to apply the new settings.

Procedure 5.6. Changing Memory Settings for the Enterprise Application Platform on Windows

  1. Navigate to $JBOSS_HOME/jboss-as/bin.
  2. Open run.conf.bat for editing.
  3. Locate the line with the memory options:
    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"
  4. Edit the line to include the new initial and maximum 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"
    
  5. If the server is runnning, restart it to apply the new settings.