This post describes some ways to configure the heap size for WebSphere application server.
Note: The instructions mentioned in this post have been tested on WebSphere 8.5.
Note: This post does not describe all possible ways of configuring the heap size. For example, it does not describe how to set the heap size using wsadmin scripts.
Method 1: Using the administrative console
Open the administrative console.
Navigate to Servers > Server Types > WebSphere application servers > <servername>
Navigate to Server Infrastructure > Java and Process Management > Process Definition
Navigate to Additional Properties > Java Virtual Machine > General Properties
Define the values (in MB) for ‘Maximum heap size’ and/or ‘Initial heap size’.
Restart the server.
Note: If the heap size is already low, the administrative console might not open. In such cases, use some other method to configure the heap size.
Method 2: By editing the configuration files
This method should be used with caution.
Search for a file named server.xml in your WebSphere installation.
Generally, the location of this file is as follows:
Select the server.xml specific to your server and edit it to add/modify/delete the attributes @initialHeapSize and @maximumHeapSize of the element <jvmEntries> The value of these attributes is the heap size in MB.
<jvmEntries ... initialHeapSize="2048" maximumHeapSize="3072" ...> ... </jvmEntries>
Restart the server after saving the changes to server.xml.
1. Tuning the IBM virtual machine for Java – http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.express.doc/ae/tprf_tunejvm_v61.html