IBM i: VM Settings for SAP WebAS Java (IBM J9 JVM)

[] [] [] [] [] [] []

Related:

  1. SAP Enhancement Package Installer 7.00: IBM DB2 for iSymptom This note provides information about problems in the installation...
  2. IBM i: Postprocessing after installing an MDM serverSymptom As part of the installation of an MDM server...
  3. IBM i: Switch from Mutex semaphores to OS semaphoresSymptom None Other terms iSeries, AS/400, OS400, system i, I5OS,...
  4. IBM i: Determining the patch level of an ILE programSymptom You want to determine the SAP patch level of...
  5. IBM i: Displaying SAPCAR messages in the APYSIDKRN logSymptom When you use APYSIDKRN to import a package, possible...
  6. IBM i: Recommendations for using MDM syst in operating systSymptom You require information about maintaining a master data management...
  7. iSeries: Known Issues with V6R1M0Symptom Issues which may occur with operating system release IBM...
  8. SAP NetWeaver Inst. Based on Kernel 7.10: IBM DB2 for i5/OSSymptom This note is valid for the following releases: SAP...

Symptom
Settings for the SAP Web AS Java on IBM i using the IBM IT4J 1.4.2 64bit JVM (J9)
Other terms
InfoAPAR, Java maximum heap size, Java cache, OS/400, i5/OS, AS/400, iSeries, System i, Java parameter, J2EE server, javac, jit compiler, headless, timezone, performance, tuning
Reason and Prerequisites
For the SAP Web AS Java on IBM i some special settings and Java virtual machine (VM) parameters are required to guarantee optimal functionality, stability and performance.
It is necessary to check the settings of your Java stack and make adaptions if required, especially since a lot of the delivered installation kits for products based on SAP NetWeaver configure suboptimal values.
This note only describes the settings for SAP systems that use the IBM IT4J JVM!
If you are running IBM i 6.1 or higher you should use the IBM IT4J JVM.
If your system is not yet running on the IBM IT4J JVM and still needs to be switched, you can find guidance on how to do the migration in SAP note 1161275.
When you still need to run your system with the IBM Classic JVM, you’ll find the recommended settings in SAP note 717376.
Additional information about tuning the SAP Web AS Java on IBM i is provided on an IBM hosted website:
http://www.ibm.com/systems/i/advantages/sapj2ee/index.html
Solution
CONFIGJVM Tool – SAP Note 1262494
The Java settings that are recommended by this SAP note can be checked and implemented very easily by using the tool CONFIGJVM. Find instructions on how to use the tool in SAP note 1262494.
SAP note 990892
It is highly recommended to implement SAP note 990892 to your system. By doing so you benefit from improved Java system properties for the SAP system processes and possible important future parameter changes will be patched automatically by SAP.
Initial heap size / maximum heap size
Setting up the heap of a Java VM and along with that Java garbage collection in an optimal way is the most crucial point to get best performance and runtime behaviour of the SAP WebAS Java on System i.
As a starting point for Java heap sizes we recommend the following values:
Server processes:
maximum heapsize (-Xmx): 2048Minitial heapsize (-Xms): 2048Mnew objects area (-Xmn): 1024M
Dispatcher processes:
maximum heapsize (-Xmx): 200Minitial heapsize (-Xms): 200Mnew objects area (-Xmn): 66M
SDM:
maximum heapsize (-Xmx): 512Minitial heapsize (-Xms): not setnew objects area (-Xmn): not set
Bootstrap processes:
maximum heapsize (-Xmx): 256Minitial heapsize (-Xms): not setnew objects area (-Xmn): not set
The values given above are basic settings which guarantee solid performance and runtime behaviour in most of all cases. However, adaptions might be needed with respect to system load and hardware resources. You can find more guidance at the IBM website http://www.ibm.com/systems/i/solutions/sapj2ee/index.html
Miscellaneous parameters to set
In server nodes running the IBM J9 VM, the following VM parameters should be set:
-Xgcpolicy:gencon
-Xdisableexplicitgc
-Xsoftrefthreshold1
-Xlp64k
-Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError,request=exclusive+prepwalk
Generation of heap dumps for the SAP Memory Analyzer (MAT)
The parameter “-Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError,request=exclusive+prepwalk” will cause the system to generate a heap dump that can be analyzed with the SAP Memory Analyzer Tool (MAT) in the case of an OutOfMemoryError.
If you like to take full advantage of the possibility to obtain heap dumps than can be used for MAT, you need to follow SAP note 1267126.
Note that the “-Xdump…” parameter mentioned in that note should be set in addition to the “-Xdump…” parameter above.
Java extension directory
The Java extension directory settings for SAP J2EE engines running on IBM i differ from other platforms. In order to make sure the system runs properly it is absolutely necessary to set the parameterjava.ext.dirsfor server and dispatcher nodes.
The correct value is
-Djava.ext.dirs=/QOpenSys/QIBM/ProdData/JavaVM/jdk14/64bit/jre/lib/ext.
When you need to extend the classpath, e.g. for external software applications, you can add paths to java.ext.dirs, separated by colon. E.g.-Djava.ext.dirs=/QOpenSys/QIBM/ProdData/JavaVM/jdk14/64bit/jre/lib/ext:</my_path>
-XX properties / -Xj9 parameter
The IBM J9 JVM doesn’t support any -XX type options or the -Xj9 parameter which may be active e.g. after a migration or a system copy from a different platform. These properties need to be deleted from any J2EE Engine configuration. Otherwise the JVM might fail to load.
Verbose garbage collection
For monitoring the garbage collection and the Java heap sizes, verbose garbage collection output can be traced to std_<Java process>.out files in the instance work directories. If you want to do so, you have to activate this trace by setting the following parameter for the Java process you want to monitor:
-verbose:gc
Maximum number of active threads
As each of the SAP WebAS Java processes embodies 100 threads or more, it is strongly recommended to adjust the Max Active value of the memory pool the Java processes are running in.
As a rule of thumb you have to increase the current value forMax Activeby a number of700per every active SAP J2EE server process.
To do this call the command WRKSYSSTS and edit the parameter Max Active. The change will become active immediately.
Note: In the past the Max Active value had an influence on the DB optimizer. But this has changed.
Number of J2EE servers
By default the number of J2EE servers is 1.
If the resources of a J2EE server process get exhausted, it is recommended to configure additional server instances. Here is how to do it:
To change the number of J2EE server, use the config tool. To add or to remove a J2EE server, click on the menu entry “Server”. There you will find “Add Server” and “Remove Server” to perform these actions. Finally you have to restart your J2EE engine. In the bootstrap phase of the J2EE start the new server(s) is(are) created or removed.
Make sure that all new J2EE servers are also configured properly. Initially the new servers do not have the same configuration as for example your current server0. (They start with default values configured by the installation or by global settings which may differ from the recommended values in this SAP note.)
Timezone
The timezone for Java should be set up according to the local area the system is placed in. Therefore an adequate value for Java system property user.timezone has to be set in file /QIBM/UserData/Java400/SystemDefault.properties.
If that file doesn’t exist, just create it. Take care that it has an ASCII codepage (e.g. CCSID 819) and that public read authority on it is granted.
To determine the adequate value of user.timezone for your country and area, go to the IBM webpage:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzatz/51/admin/reftzval.htm.
For example for Germany, add the line:
user.timezone=Europe/Berlin
to /QIBM/UserData/Java400/SystemDefault.properties
Maximum heap size for javac
The SAP WebAS Java sometimes calls the Java compiler javac to generate Java classes. In some cases java.lang.OutOfMemory errors can occur on those calls as the default maximum heapsize for javac calls can be too small. To avoid this exception change the maximum heap size parameter for javac using the config tool as described in SAP Note 759669.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment