Analysing Performance problems on HANA / HANA性能分析

Is the Performance issue system wide or does the problem only impact one transaction or report? It is important to know this at the start of your analysis as this will determine the steps you take to analyse the issue.

Performance problem is System Wide:

A good starting point that often finds the root cause of the problem is to execute the HANA Mini check report (HANA_Configuration_MiniChecks) from the KBA 1969700 , with the Mini check you get an overview of the overall health of the system in terms of Memory, CPU, I/O, locks etc and other potential issues that may cause performance problem on the system. In the output of the report potentially critical issues that require further investigation are marked with an 'X' in column 'C. In the last Column (SAP_NOTE) you find the the relevant SAP note that you need to follow to analyse the issue in more detail. Example partial screenshot of the report output in HTML format is shown below:

Performance problem is specific to a SAP transaction or Program on Application Server:

To analyse a performance problem for a SAP Transaction or Program you can use an ST12 trace as described in the KBA 2436955 - Step by step instructions on how to use ST12 trace for analysis. From HANA Database point of view in the ABAP performance trace we are interested in % of trace that is ABAP, DB etc and the ABAP Calls(s) that take the most time sorted descending by Net(%). In general if most of the time is ABAP then it is often not a database problem but there is an issue with the standard ABAP coding or the custom code:

If most of the time is ABAP in standard SAP code do a KBA and note search for the call(s) and programs(s) that use most of the Net time. From the trace on the above screenshot we would be searching for Read Table INT_BSEG. If most of time is ABAP and it is standard code then it should be possible to find a SAP note or KBA that describes the problem. If you don't find a solution  and if it is standard and not custom code create a SAP incident on the relevant application component based on the searches you have done.

If most of the time is ABAP but in custom program or transaction then you need to optimize the code using code inspector tool and SQL monitor, see the note 1912445 - ABAP custom code migration for SAP HANA - recommendations and Code Inspector variants for SAP HANA migration in this note reference "Best Practice Guide - Considerations for Custom ABAP Code During a Migration to SAP HANA” http://scn.sap.com/docs/DOC-46714 and "Optimizing Custom ABAP Code for SAP HANA – The New ABAP SQL Monitor.pdf" http://scn.sap.com/docs/DOC-47444

The following blog post also have useful information for analysis and code optimization especially the part on The Golden Rules ABAP on HANA – from analysis to optimization/

If the ST12 trace shows high HANA Database time it should be possible to find the SQL statement(s) that take a long time from the 'Performance traces' and 'SQL summary' tabs of the ST12 trace, see the 'Resolution' section of the ST12 KBA 2436955 - Step by step instructions on how to use ST12 trace for  for further information on this. For further information on tuning individual SQL statements please see the information in the KBA 2000002 - FAQ: SAP HANA SQL Optimization, question 13. Are there standard recommendations for specific SQL statements available? from the KBA has performance tuning information for standard SQL statements.

Common Known Performance issues and Solutions:

 1: System is slow in general due to problem with CPU, MEMORY. I/O or table locks, use HANA SQL script HANA_Configuration_MiniChecks from KBA 1969700 to check and follow recommended notes depending on issue found with Mini check.

 2: After migration to HANA DB for ECC or Suite on HANA system reports and transactions are slow, check that you are using HANA optimized transactions and application switches are enabled as per the PDF called SoH_Optimizations_2014_10_24.pdf attached to the note 1761546 - SAP ERP powered by SAP HANA - Optimizations.

 3: After migration to HANA DB custom transactions or ABAP custom programs are slow, see the section above called 'Performance problem is specific to a SAP transaction or Program on Application Server' for information on ABAP code optimization for HANA.

4: SELECT TOP X type statements cause performance problem on HANA (symptom : system is slow with alot of these statements running), see the note 2238679 - SAP HANA DB: High CPU consumption caused by UnifiedTable::MVCCObject::generateOLAPBitmapMVCC 

5: Poor performance of calculation view(s) after HANA Upgrade, see the following notes:

2441054 - High query compilation times and absence of plan cache entries for queries against calculation views

2291812 - SAP HANA DB: Disable/Enable CalculationEngine Feature - CalcView Unfolding

6: Poor performance of queries due to FDA (Fast data access), see question 6 from the KBA 2399993 - FAQ: SAP HANA Fast Data Access (FDA).

7: High preparation/parsing/compilation time for SQL statement, if issue is that bind variables are not used see the KBA 2375200 - How bind variables can reduce parsing or query compilation time on SAP HANA.

 

TOP Notes/KBA's for Performance analysis on HANA:

2000000 - FAQ: SAP HANA Performance Optimization

2000002 - FAQ: SAP HANA SQL Optimization

2222217 - How-To: Troubleshooting SAP HANA Startup Times

原文地址:https://www.cnblogs.com/weikui/p/13450059.html