Skip to Content
Technical Articles
Author's profile photo Chi Chiu Wong

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.)

SM50%20/%20SM66

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%3A%20SM37%20-%20Found%20replication%20job%20were%20in%20waiting%20status

Example: SM37 – Found replication job were in delay status

 

Example%3A%20Check%20SM50%20and%20found%20BTC%20processes%20were%20fully%20occupied%20during%20non-office%20hours

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%3A%20Tuning%20SAP%20LT%20Replication%20Server%20parameter

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%3A%20ST03N%20-%20Performance%20Analysis

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%3A%20Program%20variant%20used%20for%20performance%20test

Example: Program variant used for performance test

Example%3A%20Use%20SM37%20to%20measure%20program%20execution%20time

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.

You may refer to the attached URL of another article for view the detail steps on using SCI (SAP Code Inspector) for performance analysis. I am not going to repeat the basic steps here.

Reference URL for the article https://blogs.sap.com/2016/01/18/mandatory-steps-to-adapt-abap-code-for-sap-hana/

Example%3A%20Create%20Check%20Variant%20for%20SAP%20Code%20Inspector

Example: Create Check Variant for SAP Code Inspector

Example%3A%20Review%20SAP%20Code%20Inspector%20result

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%3A%20Sample%20Tuning%20-%20Revised%20coding%20per%20SAP%20recommendation%20on%20HANA%20platform

Example: Sample Tuning – Revised coding per SAP recommendation on HANA platform

Example%3A%20Sample%20Tuning%20-

Example: Sample Tuning – Revised the statement and include the condition records tables into SAP SLT replication.

Example%3A%20Sample%20Tuning

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%3A%20Sample%20Tuning%20-%20Included%20the%20table%20for%20side%20car

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%3A%20Use%20SM37%20to%20review%20program%20execution%20time%20after%20tuning

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%3A%20Review%20program%20performance%20in%20production%20system.

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.

 

Summary of the sample tuning task for this demonstration:

  • Basis Tuning: Increased the process for the SAP LT Replication Jobs and reviewed parameter tuning for SAP HANA and SAP System
  • ABAP Tuning: Change the ABAP code per SAP recommendation on HANA platform
  • Included the transaction tables, master data table (i.e. condition records, etc) used for inner join and lookup in the SAP SLT Replications for ensure the optimal performance.
  • Configured Side car to use replicated tables.

I hope this blog can help you with your SAP HANA SLT project in future.

 

 

 

Assigned tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo CELSML IT
      CELSML IT

      Looking forward for your next post.

      Please PM me for the parameters you tuned. Thanks.