SAP HANA

SAP HANA SLT – Performance Tuning on customer developed ABAP program

Introduction

In this post, I would like to share one of my project experience on performance tuning for Customer developed ABAP program from 38% improvement to 260%+ improvement after implemented SAP HANA SLT side car.

I will share some of the techniques for using sap transactions (SCI, SE30, etc) to analyze the performance bottleneck for further improvement with screens shoot captured from my work in the past which I had helped to implement SAP HANA SLT and fine tuning a customer developed report ZFI05SBL with side car.

Background – Performance Measure for customer program after implement SLT

Remark: ZFI05SBL (original program before tuning); ZFI05SBL_N (revision program tuned for SAP HANA SLT Side car)

Background: We found that there was only a slight improvement on performance (i.e. 38% – 40%) after implement side car with SAP HANA SLT for the initial performance measure for customer developed program.

Since the customer wasn’t happy about the result and refused to sign-off UAT, I had used SAP transactions SCI, SE30, ST05 for analyzed the performance bottleneck and identify the area for further improvement.

Analysis Step 1 – Checking from Basis perspective

Before we jump into application analysis and tuning, I would suggest to start performance analysis on some basic area. (i.e. system configuration, parameter settings, etc) which is important as sometimes incorrect / non-optimal configuration in system setting may cause application performance degrade.

Most of the time, I would start using SM66 or SM50 to monitor the SAP processes running in the SAP system and view the details of the processes which I suspect with performance bottleneck that had been running for long time.

You may check for following:

  • Actions running
  • Records update
  • Activities
  • Memory statistic

(Tips 1: Heap Memory à lack of memory on ABAP instance)

(Tips 2: If program running for long time without records increases, this may be due to bottleneck on database resource.)

Example: Use SM50 / SM66 to review Memory Statistic & DB statistic for long running processes

In addition, I also reviewed the SAP HANA database replication processes and found that there were times that the replication processes were pending on HANA database during non-office hours.

Example: Found SAP HANA SLT process pending
Example: SM37 – Found replication job were in delay status
Example: Check SM50 and found BTC processes were fully occupied during non-office hours

Finding 1 – Example: Replication Process pending & delayed due to lack of background process

After checking the SM37 and SM50, I found that replication job had been delayed due to all background processes had been occupied during table replications in the non-office hours.

Therefore, I had tuned the system parameters in SAP operation mode (Tcode: RZ03) for increase number of work processes for background jobs and fine tuned the SAP HANA SLT replication server parameters.

Example: RZ03 – Increase BTC process in operation mode
Example: Tuning SAP LT Replication Server parameter

Analysis Step 2 – Capture original program performance as baseline

After we confirmed that the system configuration and resources is optimal, we may start to measure the customer developed program performance before tuning as baseline figures.

I had used 2 transaction ST03N and SM37 for measure the program execution time.

Example: ST03N – Workload Analysis (Transaction Profile)

Workload Analysis (ST03N)

I used transaction ST03N Transaction profile for review performance before and after SLT HANA replication and ABAP accelerator and checked for program behavior before switch the program to run on HANA database table. These figures can be used for troubleshoot and use for identify performance bottleneck.

Job Overview (SM37)

I used transaction SM37 to review the job execution time before and after using SAP LT replication on HANA wand ABAP accelerator.

Example: Program variant used for performance test
Example: Use SM37 to measure program execution time

We found that the performance is improved if retrieved data with 3 months and 8 site for this report.

Time 1:

Original Execution Time: 9596

Time 2:

SLT Execution Time: 6941

((T2 / T1) – 1 ) * 100 = 38%

The 1st testing result is improved 38% for replicate tables on KONP, MARA, MBEW and MBEWH

Since we see that the performance is not improved a lot with ABAP Accelerator and SAP LT HANA replication. We perform the code inspection for this program to check for area need to be tuned.

Analysis Step 3 – SAP Code Inspector

I had used the SAP Code Inspector for analyzed the customer developed program for identify the program code required performance tuning.

Example: Create Check Variant for SAP Code Inspector
Example: Review SAP Code Inspector result

Finding 2 – Example found some SQL statement are checking on some tables not replicated with SLT.

I had reviewed the SAP code inspector result and identified that there are some code required tuning for optimal performance for running in SAP HANA. In addition, I also found that some of the tables used in where clause filter had not replicated to SLT. Therefore, I had added the tables for replication and tuned the ABAP code per SAP recommendation.

  • Update ABAP Code per SAP recommendation for code change in HANA environment.
  • Include the tables for SLT replication and side car
Example: Sample Tuning – Revised coding per SAP recommendation on HANA platform
Example: Sample Tuning – Revised the statement and include the condition records tables into SAP SLT replication.
Example: Sample Tuning – Check the statement and ensure inner join table are included in SAP LT replications.
Example: Sample Tuning – Included the tables used in inner join for SAP LT replication
Example: Sample Tuning – Included the table for side car

Review Program execution time after tuning

After performed the tuning, I had execute the program with SM37 at different timeslot with same program variant selection to verify the performance had improved after tuning.

This time I found that the program execution time had improved around 95% to 104% for 3rd to 6th round of testing in different timeslot.

No. Time 1  Time 2  Ratio   % Improvement 
1st Round  9596 6941 1.38 38.25%
2nd Round  9596  6888  1.39  39.31% 
3rd Round  9596  4685  2.05  104.82% 
4th Round  9596  4737  2.03  102.58% 
5th Round  9596  4719  2.03  103.35% 
6th Round  9596  4903  1.96  95.72% 

Remark: Calculation of % of Improvement: ((T2/T1) – 1 * 100%)

1st – 2nd round – execution after using activate ABAP accelerator.

3rd – 6th round – execute after tuning by adding additional tables for push down database operations to HANA database.

Example: Use SM37 to review program execution time after tuning

Review ABAP Analysis (SE30)

Although I had verified that the program execution time had improved, I had further checked the ABAP program with transaction SE30 for identified the area can be further fine tuned.

Tips: I usually check on the Net(%) for identify the area should be review for further improvement.

Example: Review SE30 ABAP Analysis result

Final Review in program execution time after deployment to production system

At last we had compared the original program and the fine tuned program in production system.

We measured the program execution time between original program and the fine tuned side car version using identical program variant for selection and found significant improvement as below for 8th to 12th round of the performance testing.

No. Time 1  Time 2  Ratio   % Improvement 
1st Round  9596 6941 1.38 38.25%
2nd Round  9596  6888  1.39  39.31% 
3rd Round  9596  4685  2.05  104.82% 
4th Round  9596  4737  2.03  102.58% 
5th Round  9596  4719  2.03  103.35% 
6th Round  9596  4903  1.96  95.72% 
7th Round 9596 7967 1.20 20.45%
8th Round 9596 1042 9.21 820.92%
9th Round 9596 1190 8.06 706.39%
10th Round 9596 1554 6.18 517.50%
11th Round 9596 1166 8.23 722.98%
12th Round 9596 2602 3.69 268.79%

Example: Use SM37 to review program execution in production system.

Remark: ZFI055SBL is original program; ZFI055SBL_N is the tuned side car version with SAP HANA SLT.

In conclusion, we may improve the customer developed program using SAP HANA SLT (side car) with optimal setting in replication server & SAP server.

Leave a Reply

Your email address will not be published. Required fields are marked *