To change the heap size.
- Sign into the WebSphere web console.
- In the left panel, expand Servers > Server Types, and select WebSphere application servers.
- Select the application server.
- Expand Java and Process Management and select Process definition.
- Select Java Virtual Machine.
- Update the Initial heap size and/or Maximum heap size.
- Select Apply.
- Select Save.
- Restart the JVM for the change to take effect.
In this example, the initial heap size is 64 MB and the maximum heap size is 256 MB.
Sign onto the server and issue the following command to ensure the JVM has the appropriate initial heap value at runtime. In this example, the JVM has an initial heap value of 64 MB.
~]# ps -ef | grep jvm_name | sed "s| |\n|g" | grep -Xms -Xms64m
Issue this command to ensure the JVM has the appropriate maximum heap value at runtime. In this example, the JVM has an maximum heap value of 256 MB.
ps -ef | grep jvm_name | sed "s| |\n|g" | grep -Xmx -Xmx256m
If you have a tool that produces a graph of the heap, the graph can to used to know what would be a good minimum heap size. For example, in this graph, the steady state for the minimum heap is around 200 MB. In this scenario, a miminum heap of 128 MB would probably be good.