Skip to main content

SAP JAVA Heap Memory Analyzer and logs for Portal 7.3

 SAP JAVA Heap Memory Analyzer and logs for Portal 7.3


Summary:-

The information of this document contains how to check the logs in SAP Net weaver portal 7.3 and how to analyze the java heap memory in which we have to find the root cause of issue where and which objects are leaks suspected.

Author: Brindavan Mookaiah

Designation: SAP BASIS Consultant



Table of content


  1. SAP java stack log locations…………………………………………………………………………………………….
  2. SAP Java heap memory analyzer with Eclipse tool……………………………………………………………………
  1. 1) SAP java stack log locations

SAP java stack logs can be found in below directories which will help for BASIS Netweaver admin (what is happening and happened in server). There are two location where we find logs:

The first location  is  “/usr/sap/SID/J00/work “ .In this location  you can find some of the logs are like dev_server0 , dev_jsmon  dev_icm dev_bootstrap..etc.. but the dev_server0 which is important to help you what happened in  the server during server crush or  unable to startup the system.

The second location is “/usr/sap/SID/J00/j2ee/cluster/server0/log “. In this location the default trace will be available to help you to find the application level logs and issue. For example if the ABAP system is connected to portal using ADS connection, if the connection is not established or ADS is not working. It will help you in many ways.

There is one more tool called JVM-GUI which can be monitored in online of JVM. The jvm location directory is “/usr/sap/SID/SYS/exe/jvm/rs6000_64/sapjvm_6.1.061/sapjvm_6/bin”.

Through this tool you can monitor about VM details performance, debugging and trace flags. It will show the CPU time and memory area etc…

JVM1.JPG

The option in Command, Print, DUMP and debugging are which you will be able to view system information, command processing dump heap …etc

JVM2.JPG

2) SAP Java heap memory analyzer with Eclipse tool

The Memory Analyzer is an Open Source Project at Eclipse (http://www.eclipse.org/mat/)
The Memory Analyzer was developed to analyze productive heap dumps with hundreds of millions of objects. Once the heap dump is parsed, you can re-open it instantly,and get the retained size of single objects and quickly approximate the retained size of a set of objects. The Analyzer is (relatively) low on resource consumption, so you can analyze multi-GB heap dumps. SAP Memory Analyzer supports by default HPROF binary heap dump in SAP JAVA stack which can be found in the following directory
“/usr/sap/SID/J00/j2ee/cluster/server0 “000.hprof.

2.1 Download the memory analyzer tool in above link.
2.2 Double-click on MemoryAnalyzer.exe to start Memory Analyzer Tool

The screen will appear as follow:

MA1.JPG

2.3 click options file and then click open the file to load the “hprof” from the server which you have taken. The following screen will the overview of the “hprof” file.

MA2.JPG
In the above screen you can see how the memory has been used.


Then click the leak suspected option to check which object causing more memory (top contributed the foot prints).
MA3.JPG

In the above screen you can find the two problem suspect 2

One instance of “com.sap.sql.connect.pool.Pool” loaded by “com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 0x5a2c79c8” occupies 659,542,448 (33.12%) bytes. The memory is accumulated in one instance of “com.sap.sql.connect.pool.Pool” loaded by “com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 0x5a2c79c8”.
One instance of “oracle.jdbc.driver.T4CPreparedStatement” loaded by “com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 0x5a2c7ba8” occupies 580,921,280 (29.17%) bytes. The memory is accumulated in one instance of “byte[]” loaded by “<system class loader>”.

click on find option and paste the ID “0x5a2c79c8”.

MA4.JPG

You can find the class loader ” “0x5a2c79c8” into the new tab like below.

MA5.JPG
This class load  memory address referring  the heap used size. you can also drill down which class and where the heap memory used.


By filtering the top memory object for outgoing or incoming dependency to find the leak suspected. In here we are only able to see the DSR.ADMIN and buffer admin utilize. If you have problem without going dependency in application then you will able to find where exactly leak suspected. For example:  closed method not used in java program or any issue foot prints can be highlighted where the leak suspected causing more memory used. Based on this analysis you can tune your program or resource wise.

MA6.JPG
Here we have found that “Resource multiple class loader “used some memory.  The following utilized memory is from application into database level and update some data. It means that the portal system is connected to some ABAP or SRM system,through portal system they are accessing ABAP or SRM system for their business need and updating some data into the database.

For more details about this Memory analyzer tool visit the below link:


http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40244428-5703-2a10-17af-9e878922f900?QuickLink=index&…

source: scn.sap.com

Comments

Popular posts from this blog

SAP ST-PI and ST-A/PI Patch Update Steps

SAP ST-PI and ST-A/PI patch update Summary :- This document will show you how to update the ST-/PI and ST-A/PI in SAP with help of service preparation check RTCCTOOL . Author: Brindavan Mookaiah Designation : SAP BASIS Consultant Tabls of content 1) EWA report 2) Run RTCCTOOL 3) Implement the ST-A/PI and ST-PI Step 1) Check the EWA report about the ST-PI and ST-A/PI patch to update. SAP will recommend upgrading the new version based on SAP Application. Steps 2) Once if you able to see that the ST-A/PI & ST-PI  need to update and SAP recommeded. Then login into SAP and go to T-code SE38 and then execute program  ‘RTCCTOOL ‘. Download the latest ST-PI and ST-A/PI from service market place http://www.service.sap.com Once you downloaded  the required file(ST-PI& ST-A/PI) from market place and copy the file into the server. Mostly this file will be SAR file. Login in to OS level with SIDadm and extract the file using SAPCAR. ,After  th

How to export RFC destinations prior Refresh

The best and easiest way... Goto SE01, create transport request (Transport of Copies) R3TR TABU RFCATTRIB * R3TR TABU RFCDES * R3TR TABU RFCDOC * R3TR TABU RFCSYSACL * If you take only RFCDES you will be missing the Documentation part of RFCs in order to take everything you need to have export of all the above mentioned tables.

SAPROUTER Installation

his blog intends to support all consultants who work with SAP ROUTER setup and maintenance. Introduction: The step by step configuration procedure is to install SAP ROUTER on Windows platform (The same procedure can be used in Unix environment) Importantly, if the system is in Domain, perform entire operation with domain admin user only. Not with local admin. Configurations steps: OSS message to SAP: Raise an OSS message to SAP for component XX-SER-NET-NEW with following information. “Request you to please register our Public IP & Host Name for SNC connection for SAP Router <saprouter box hostname> Details: Public ip:<public of your saprouter server> Hostname:<hostname of your saprouter server> Please contact <name> and <number > for more information on this“ Response from SAP would be: Dear customer, We’ve registered your data for the SNC connection to SAP Support. Please do the following: – Go to the http://service.sap.com/s