Database Reference
In-Depth Information
CHAPTER 23
SAP Performance Tuning in the Java Stack
This chapter focuses on performance tuning concepts in the Java stack, such as memory al-
location in the Java Virtual Machine (JVM); the garbage collection process in the JVM and
its relationship to performance tuning; and scaling Java stack-based SAP applications by
adding server nodes, threads, and, if needed, application servers. We will cover tasks such as
configuring heap size and different memory areas using tools such as the configuration tool.
We will also discuss common SAP Java performance issues, and toward the end of the
chapter, specific examples will be provided for improving NetWeaver portal performance.
Java Memory Concepts
In order to configure and tune Java memory, it is important to understand the different
memory areas of the Java Virtual Machine and the allocation and usage of the areas when a
Java application is in use. This understanding will also help to troubleshoot issues with Java
stack crashes as a result of memory-related issues. When a SAP Java stack is installed, it will
take the installation defaults or configured values to start the Java engine and the application.
After this the Basis administrator has to tune the Java stack memory parameters to cater to
the needs of the individual Java application. SAP OSS Note 723909 provides detailed JVM
recommendations for SAP NetWeaver releases 6.4 and 7.0. SAP Note 723909 includes refer-
ences to several different OSS Note numbers for specific JDK vendors such as Sun, HP, and
IBM. The appropriate OSS Note number should be used to get the recommended JVM para-
meters. SAP OSS Note 1248926 provides the details for NetWeaver 7.1-based products.
The maximum allocated memory (heap size) of one server node or the sum of the heap
sizes of all the server nodes in a cluster must fit in the physical memory of the operating sys-
tem. If this is not the case, then operating system swapping will occur with a serious degrada-
tion of system performance. For 32-bit operating systems and JDKs a maximum heap size of
1GB is recommended. For a 64-bit operating system and JDK a maximum heap size of 2GB
is recommended. The maximum heap size for 64-bit operating systems and JDK can be in-
creased up to 3.5GB, but the garbage collection process can take a little longer. Usually, it is
better to add a server node that is configured correctly than to increase the heap size more
than the recommended values. SAP provides a configuration tool for making changes to the
memory areas of the JVM, which require a restart of the J2EE engine. The three main areas
of the JVM memory are the young generation memory area, the tenured (old) generation
memory area, and the permanent generation memory area. The heap size is defined as the
sum of the young and tenured generation memory area sizes. Table 23-1 lists the memory
areas of the JVM with a brief description and technical name of the parameter. It is recom-
Search WWH ::




Custom Search