Choice of garbage collection algorithm can have a huge impact on the performance of an application, which is why HotSpot provides a number of choices. This recipe explains how to set the garbage collection algorithm for HotSpot, and then discusses the trade-offs between the algorithm choices at a high level.
This recipe assumes you are using the HotSpot JVM. There is a separate recipe covering JRockit.
For more details, refer to the Getting ready section of the Setting the new size recipe.
To set the HotSpot garbage collector for a WebLogic Server, perform the following steps:
Navigate to the domain's bin directory:
cd %MIDDLEWARE_HOME%/user_projects/domains/soa_domain/bin
Open the
setSOADomainEnv.cmd
orsetSOADomainEnv.sh
script in a text editor.Locate the following lines:
SET DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m –XX:MaxPermSize=512m SET PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=128m –XX:MaxPermSize...