Starting in WebSphere® Application
Server V8.0.0.1 release, you can modify the initial and maximum heap
size for the EJB deployment tool by setting the EJBDEPLOY_JVM_HEAP environment
variable. This environment variable must be set before running the ejbdeploy command.
You can use the EJBDEPLOY_JVM_HEAP environment variable
to overwrite the default setting of 256 megabytes for both the initial
and maximum heap size (-Xms256m -Xmx256m)
that is available to the EJB deployment tool.
Procedure
- From a command prompt, specify the following command:
export EJBDEPLOY_JVM_HEAP="-Xms<initial_size>m -Xmx<max_size>m"
set EJBDEPLOY_JVM_HEAP=-Xms<initial_size>m -Xmx<max_size>m
Where <initial_size>
specifies the initial heap size in megabytes and <max_size>
specifies the maximum heap size in megabytes available for the EJB
deployment tool.Tip: The value set for <max_size>
should never be increased above the system memory. Increasing the
setting above the available system memory can cause system paging
and a significant decrease in performance.
- Verify if the EJBDEPLOY_JVM_HEAP environment
variable is set by running the ejbdeploy command
in a command prompt, and then find a statement describing the JVM
heap size being used, for example "using JVM heap -Xms256m
-Xmx1024m". If the statement does not appear, the EJBDEPLOY_JVM_HEAP environment
variable is not set, as a result the initial and maximum heap size
defaults to 256 megabytes. Here is an example of configuring and
verifying the EJBDEPLOY_JVM_HEAP environment variable
is set from a command prompt on a Windows operating
system:
X:\bin>set EJBDEPLOY_JVM_HEAP=-Xms256m -Xmx1024m
X:\bin>ejbdeploy
"using JVM heap -Xms256m -Xmx1024m"
EJBDeploy (v8.0, @build@)
Syntax: EJBDeploy inputEar workingDirectory outputEar [options]
Options:
-cp "jar1;jar2" List of jar filenames required on classpath
-codegen Only generate the deployment code, do not run RMIC or Javac
-bindear:options Bind references within the EAR
...
Where X is the
installation directory where WebSphere Application
Server is installed. The example shows how to set the EJBDEPLOY_JVM_HEAP environment
variable to increase the maximum heap size to 1024 megabytes while
keeping the initial size to the default value of 256 megabytes.