Here we go, the most important performance consideration for any SAP NetWeaver Java system, especially one of type PI, CE or Portal. Let’s say your system hangs, it crashes, requests are non-responsive, interfaces stall, or monitoring behaves strangely. All of these issues could be caused by completely different things, BUT they can also all be caused by one thing.
Are you ready for me to save you hours and hours of useless debugging?
So if you’re having various, annoyingly strange issues with your Java system, this is the first and most important tip I can recommend for you:
Having sufficient memory is the most important factor for a SAP Java system to function properly. Speaking from experience, a SAP Java system with one central instance, regardless of type, should have at least 16 GB of memory. For each application server that you add to the central instance, another 16 GB. To be on the safe side, I recommend at least 64 GB per application server for production systems.
Depending on the type of activities that go on in your system, and if time allows, it would be best to monitor the usage of memory and then coming up with your own sizing.
The reason SAP Java systems can behave like wailing newborns when not given sufficient memory is all because of one thing: the garbage collection. And I can’t stress enough the importance for garbage collection to function smoothly on SAP. Java systems are recommended by SAP to be allocated 3 to 4 GB of java heap memory. So you may think, like I once did, that the amount of memory you add to the server has no impact on the Java application server.
Although applications running on a Java system utilize only the allocated JVM heap, the garbage collection processes utilize way more than what’s allocated to the JVM. Upon monitoring the memory usage of a Java system, you should see that when garbage collection takes place, the memory usage goes up on the server, surpassing 3 to 4 GB, usually hitting the 16 GB ceiling.
So, there you have it. Put a leash on your SAP java system by increasing memory!