How to increase memory in MCS

From Buni.org

Jump to: navigation, search

HOWTO: increase the available memory to MCS

Explanation

The amount of memory available to MCS is based on the Java heap size. The heap size should be LARGER than the actual amount in use at any time in order to allow for efficient allocation and cleanup (high throughput/low pause based garbage collection). There are additional settings that may be useful for some high-end installations but those require expert tuning to do safely.

$INSTALL/bin/run.conf or $INSTALL/bin/run.bat

On UNIX, edit $INSTALL/bin/run.conf in your favorite editor. On Windows operating systems, edit $INSTALL/bin/run.bat. Find a line that looks like this:

if [ "x$JAVA_OPTS" = "x" ]; then JAVA_OPTS="-server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" fi

or

rem Sun JVM memory allocation pool parameters. Modify as appropriate. set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

These settings will ultimately be passed to the "java" command line when MCS is launched. the -Xmx parameter is the MAXIMUM size of the heap. The -Xms parameters the MINIMUM size. For large production installs it is recommended that these be equal as reapportioning the heap during high yields will produce performance spikes.

Whatever you do do not remove the -Dsun... settings or strange things will happen. You will need to restart the server in the event that these are changed.