One Size Does NOT Fit All - WebSphere Application Server Heap
Stacy_Cannon 270000W20T Visits (7991)
Where do I start with sizing the heap for my WebSphere Application Server? This question is very common when trying to determine where to begin sizing your heap for your application when using WebSphere Application Server. The default heap sizes are for use during installation and are often way too small for use in production environments. The first place to begin is to know if the server has 32-bit or 64-bit architecture and whether your installation of WebSphere Application Server is a 32-bit or 64-bit environment. Next determine the amount of available RAM memory on the machine. Also as a starting point do not add non-default GC options. Now you are ready to begin sizing your heap!
In a 32-bit environment it is often recommended to start with your max heap size at 1024mb (1gb) (-Xmx1024m). Keep in mind though on a 32-bit environment it is not recommended to go larger than 1.5gb (1536mb). If you go higher than this you can run into native memory issues and that is a whole other ball game. Once you have your starting point then you can monitor your heap usage via garbage collection or other monitoring tools and then increase or decrease the heap based on your test runs. Remember that in a 32-bit environment there is 4gb of memory. Around 2gb of that memory (both heap and native) goes to the operating system so that leaves only around 2gb for your application and WebSphere heap and native memory needs.
For a 64-bit environment there is more to consider. Just because you have a 64-bit environment does not mean you have unlimited memory. You are limited to the amount of memory you have available on the server. A good starting point for 64-bit environments is 4096mb (4gb) (-Xmx4096m). Then as you monitor your heap usage you can decrease or increase the heap but always keep in mind you can only increase it based on the amount of memory you have available.
Remember these are just starting points and there is no one size fits all. Applications have different needs and it takes monitoring and tweaking the heap to find the size that works and performs the best! You may also want to try a different gc policy if you still are not finding the optimum performance. Good luck!