IBM Support

Increasing Maximum Heap for Application Deployments in WebSphere

Technical Blog Post


Abstract

Increasing Maximum Heap for Application Deployments in WebSphere

Body

  

How and Where to increase the Maximum Heap for Application Deployment depends entirely upon whether you’re using the Admin Console, WSAdmin interface or EJBDeploy tool .

 

* Note that when using the Default Gencon GC policy with current WebSphere product releases such as v8.5.5.x & v9.x, we typically recommend both Initial and Maximum Heap values to be set to the same value. This setting avoids the additional configuration associated with resizing the heap to satisfy allocation requests and generally performs best in most environments.

 

1.) Using the DMgr or Base AppServer Admin Integrated Solutions Console or GUI,  increase Initial and Maximum Heap values for Java Process.

  • The JVM Heap size can preferably be changed from the Administrative Console for the java process settings using these two steps, saving the configuration and restarting the process or service.
    1. Expand Servers > Server Types > WebSphere application servers and click your server name.
    2. Click Java and process management > Process definition > Java virtual machine.
  • The JVM Heap size can alternatively be adjusted by using the -Xms (Initial) and -Xmx (Maximum) command-line parameters as generic JVM arguments inside of the console.

 

2.) Using WSAdmin, either use -javaoption or AdminTask.setJVMMaxHeapSize, more details given below.

 

  • WSAdmin -javaoption

 

   Using Jacl:

   [Windows]

   wsadmin -javaoption -Xms1024m -javaoption -Xmx2048m -f test.jacl

   [AIX] [HP-UX] [Linux] [Solaris] Specify multiple Java options

together or separately:

   wsadmin -javaoption "-Xms1024m -Xmx2048m" -f test.jacl

   or

   wsadmin -javaoption -Xms1024m -javaoption -Xmx2048m -f test.jacl

 

   Using Jython:

   [Windows]

   wsadmin -lang jython -javaoption -Xms128m -javaoption -Xmx256m -f

test.py

   [AIX] [HP-UX] [Linux] [Solaris] Specify multiple Java options

together or separately:

   wsadmin -lang jython -javaoption "-Xms1024m -Xmx2048m" -f test.py

   or

   wsadmin -lang jython -javaoption -Xms1024m -javaoption -Xmx2048m -f

test.py

 

When using wsadmin in LOCAL mode (conntype=none), this property can be

passed in as a javaoption:

wsadmin -conntype none -javaoption

 

* You need not ever concern with changing the PERF_JVM_OPTIONS variable in

WSAdmin.sh itself, this should not be necessary nor is it a recommended option.

 

  • AdminTask.setJVMMaxHeapSize

 

   Using Jython:

 

   AdminTask.setJVMMaxHeapSize('-serverName server1 -nodeName node1

-maximumHeapSize heap_size')

 

   Using Jacl:

 

   $AdminTask setJVMMaxHeapSize {-serverName server1 -nodeName node1

-maximumHeapSize heap_size}

 

 

3.) When using EJBDeploy.bat/sh either export and set EJBDEPLOY_JVM_HEAP property or edit the ejbdeploy script itself:

 

  • Command line

export EJBDEPLOY_JVM_HEAP="-Xms<initial_size>m -Xmx<max_size>m"

set EJBDEPLOY_JVM_HEAP=-Xms<initial_size>m -Xmx<max_size>m

 

  • Editor

Edit the following file: {WAS_install_directory}/deploytool/itp/ejbdeploy.bat in a Microsoft® Windows® operating system or .sh in Linux® and change modify -Xmx value.

Locations are different in Base or Network Deployment environments, as depicted below:

  • Base AppServer - /usr/WebSphere/AppServer/deploytool/itp/configuration
  • Network Deployment Manager - /usr/WebSphere/AppServer/profiles/Dmgr01/ejbdeploy/configuration/

 

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11080891