Abap Performance Tuning Pdf Free Download
The ST07 application monitor tool can help you in analysis of your system for performance and usability. It gives an overview of how many users are using which functional part of your SAP system.
Questions that will be answered in this blog are:
- How to run the ST07 application monitor?
Application monitor
If you start ST07 you reach the application monitor start screen:
Here you can see how many users are defined and actually logging on across the modules. Basis is very high usually since this includes SMEN which is the start menu. The Other category is for Z transaction codes and/or addon software.
By double clicking on any line you can inspect the lower application levels.
DB access analysis
From the main screen, you can hit the button DB accesses to view which application parts are responsible for the majority of the database accesses:
Questions that will be answered in this blog are:
- Which information should I provide when reporting a performance issue to SAP?
- What should I have already checked before submitting performance issue to SAP?
When to report a performance issue to SAP?
You can report a performance issue to SAP when you are sure it is caused by standard SAP.
There are 2 cases:
- Overall system performance
- Specific transaction performance
Validations to be done upfront:
- Issue is system wide: in this case it is most likely a issue with your network, storage, database or all work processes are filled up. See the blog on performance first aid kit. Run also the snapshot monitoring (see blog).
- Database issues: check for example specific notes on Oracle: 1817553 – Checklist for performance problems in SAP Oracle Databases, and HANA: 2000000 – FAQ: SAP HANA Performance Optimization
- Specific transaction performance: check that the issue is not caused by Z code. To analyze if Z code is not the root cause, run the ANST trace for the transaction that is reported as slow. Then check if Z code is involved or not. You can use the SAT tool or ST12 performance trace tool to further analyze the Z code poor performance.
- Check the tools in the PDF document attached to OSS note 2442365 – Survival Guide for performance analysis on SAP system.
- In case of performance issues between systems and users: for example on development transaction is fast, but slow on production, or it is fast for user A, but slow for user B, then first check OSS note 3006447 – Comparing slow transactions, users and reports between systems.
What information to provide in a performance issue to SAP?
In case of specific performance issues, add as much specific information as possible. Try to have a case in a development, test or acceptance system as well. In these systems SAP can replay the performance issue without running the risk of hampering the end users performance. Add trace files (ANST, ST12) to speed up the analysis for SAP. It also makes debugging and running large trace files easier for SAP.
SAP checklists
Good checklists are present in OSS notes:
- 2399769 – General Performance: Troubleshooting Questions
- 3017593 – Documenting and capturing a General performance issue
- 3033103 – Information required for initial analysis of Performance Issues in SAP AS ABAP
The ST12 performance tracing tool allows you to collect performance data for solving a performance issue for a single transaction.
Questions that will be answered in this blog are:
- Which data is collected in a ST12 performance trace?
- How do I execute a ST12 performance trace?
- How do I analyse a ST12 performance trace?
- How can I export a ST12 performance trace?
Performance trace collection
Start transaction ST12:
Select the user ID that you want to trace (can be your own user) and leave the ST12 session open. In a second session execute your actions. When you are done, return to the ST12 session and press the End traces & collect button:
Confirm the traces to collect.
Evaluation of traces
On the Collected trace analysis screen section hit the Full screen button:
This will open the easier to use full screen mode for analysis:
Now you can expand the traces and use the ABAP trace, performance trace, SQL trace buttons to launch the required performance analysis tools.
For more background on the tools read the blogs about:
- SAT ABAP trace
- ST05 SQL performance trace
Downloading the trace file
You can download the generated trace file to export to different system or to send to SAP. For example you have recorded the trace in production and want to do the further analysis on the development system.
To export goto transaction ST13 and use tool ANALYSISBROWSER:
Then select menu option Download / Text Download / Export to frontend to download the trace to your desktop or laptop.
Background
OSS background notes on ST12 performance tracing:
- 2169881 – How to trace background job using ST12
- 2436955 – How to collect and analyze traces using ST12 (single transaction analysis)
- 2535415 – ST12 tracing pitfalls – no traces collected
- 2543882 – Sending ST12 trace to SAP for analyses
- 2771272 – Exporting an ST12 trace for analysis
- 2977673 – ST12 trace size is not sufficient
Sometimes you might get very weird performance results in a productive system. In the end it might turn out that performance on an application server is ok, and on another one it is not ok. This can be because of different infrastructure per application server or different settings.
The ABAPMETER performance tool will help you to analyze the differences between application servers. It will fire a series of standardized tests to each application server.
Questions that will be answered in this blog are:
- How to run the ABAPMETER performance tool to check for differences in application server response times?
Running the ABAP meter performance tool
Start transaction ST13 and select tool PERF_TOOL to goto the performance tools:
Now select the ABAPMETER tool and press execute:
The tool will now run the tests per application server. Pending on the amount of application servers it might take a few minutes.
Results are shown:
You can now see if there are significant differences between the application servers.
Background
Background OSS notes:
- 2879613 – ABAPMETER in NetWeaver AS ABAP
- 2953258 – How to chart ABAPMETER output when scheduled as a background job
- 3007524 – Extended Performance Data Collection
Snapshot monitoring enables you to capture snapshot of current performance and usage of work processes. This can be used to analyze performance issues.
Questions that will be answered in this blog are:
- How to setup snapshot monitoring?
- How to analyze the results of snapshot monitoring?
Setting up the snapshot monitor
Start transaction /SDF/SMON for snapshot monitoring:
If you don't have any snapshot monitoring yet, you will reach the schedule screen:
Now you can plan a separate snapshot monitoring run, or set up the daily run:
For each run: check to increase the Interval timing!
Analyzing the snapshot monitoring results
With the Analysis button you can analyze the results:
References
The tool /SDF/MON has been replaced by the SMON tool in netweaver 7.5 (using tcode /SDF/SMON). You will find notes for both tools.
SAP wiki for snapshot monitoring can be found on this link.
Explanation OSS notes:
- 2383809 – How to configure /SDF/MON for performance monitoring and analysis
- 2651881 – How to configure SMON for performance monitoring and analysis
Bug fix OSS notes:
- 2950911 – Different default settings are required for HANA and Non-HANA DB
- 2999163 – sdf/smon only indicates free RFC WPs available for normal priority requests
- 2997465 – WP aggregation list does not work in the GoTo menu of report sdf/mon
This blog will give some first aid kit tips on performance issues on ABAP stack reported by end users. The system is up and running, but still user(s) complain about performance. What to do first?
SM50/SM66
Basically the first analysis always starts with SM50 (or when you have multiple application servers SM66).
Checklist for SM50:
- Are all the DIA dialog processes full or almost full? –> if yes, then performance as total system will be slow. Check to find source for having so much DIA's active.
- Are all the BTC dialog background processes full? –> if yes, then all other batches will wait.
- Are the UPD processes full? –> if yes, then all the other updates have to wait.
- Are the SPO processes full –> if yes, then all prints have to wait.
Now you have a first impression of the state of the system.
Asking the user the right questions
Go back to the user complaint and start to ask questions:
- Is he the only user complaining? Or are multiple users complaining?
- Is the complaint about online or background job? Users can complain like 'system performance is slow, since my background job takes a long time to start'
- Is the complaint for updating or querying?
- Is the complaint about printing?
- Is the complaint about about performance in general or a specific transaction?
- Is the complaint running now, or was it in the past?
If possible ask the user to start the poor performing transaction now so you can monitor it in SM50.
Solution kit
Too little dialog processes
If you cannot quickly locate the source of the process that is causing to consume all the dialog processes, you best temporarily increase the amount of DIA processes in the operation modes in RZ04.
Background processes full
Check to find the source of the large amount of background processes. If still too few, you can temporarily increase the amount of DIA processes in the operation modes in RZ04.
Another option is to check if some jobs can be stopped and planned at a later time.
Update processes full
If the update processes are full, check if the update process is running correctly in SM13.
Spool issues
If no prints are coming out of the system, there might be an issue with spool number range. System can look like this:
OSS note 48284 – System cannot generate any more spool requests contains the workprocedure.
Another solution can be to delete old spools.
If there are too many prints and too little spool processes, increase the amount of SPO processes in RZ04.
Buffering issues
Use transactions ST02 and AL12 to check for buffering issues. Read more about SAP buffering in this blog.
SAP references
SAP survival guide for performance issues: SAP note 2442365 – Survival Guide for performance analysis on SAP system contains an excellent PDF attachment for analyzing performance issues.
Fast serialization is an option in the RFC settings to increase performance.
Questions that will be answered in this blog are:
- What is required to use RFC fast serialization?
- When to use RFC fast serialization?
- How do I make the settings for RFC fast serialization?
Fast serialization
Fast serizalization is available since release Basis 7.51. Downport might be possible, but think twice if you want to do this. Background OSS note on fast serialization is 2372888 – Fast serialization in RFC.
The whole goal of fast serialization is simply to increase the performance.
The fast serialization option is set in the RFC destination on the tab Special Options at the bottom:
Note that in S4HANA destination NONE is using fast serialization by default. Keep it that way.
When to use fast serialization
Fast serialization can be used when both the sender and receiver side of the RFC connection supports it.
Fast serialization in custom or standard RFC function modules
In SE37 SAP can set an RFC enabled function module Interface Contract to Fast serialization required. If you have build custom RFC function module that also only works with Fast serialization you should set this option:
This blog explains how to use the SWLT performance tuning worklist to find poorly performing Z code by combining SQL monitoring data from production and ATC results.
Questions that will be answered are:
- How to setup the SWLT performance tuning worklist tool?
- How to analyze the results from the SWLT performance tuning worklist tool?
Preparations
As preparation for the SWLT tool you must have run the SQL monitor in a productive system and created a snapshot of the data. This snapshot you can export and import in a development system. In the development system you configure and run the ATC code check tool.
The SWLT performance tuning worklist tool will combine these results. As example we will use this poorly written Z code:
Running the SWLT tool
Start transaction SWLT:
You can reduce the scope by just taking the needed Z packages. Goto the tab Static Checks to select the appropriate result of the ATC run (for more on ATC read this blog):
Now select the SQL monitor tab to select your SQLM data snapshot you took from your productive system:
Now that all data is loaded, you can hit the execute button to start the SQL performance tuning worklist.
The tool will now start to merge the results. In the example above you can see the following result:
In the total result select a line. On the bottom left you can see the SQL monitor results. Bottom right you can see the ATC check result. Clicking on the underlined program or SQL statement will bring you to the poorly performing ABAP code point.
Bug fix notes
3060630 – Runtime error RUNT_INTERNAL_ERROR while fetching SQLM data (e.g. via SWLT)
This blog will explain about the SQLM tool to monitor expensive SQL statements in a productive environment.
Questions that will be answered are:
- How to start and configure the SQLM tool?
- How to analyze the results?
Configuration of SQLM tool
The SQLM tool does not require specific configuration or installation if you have a bit modern SAP system. To activate it start transaction SQLM and click on the Activate button for All Servers:
The trace is active now until the given time frame.
Example use of the SQLM transaction
First we start by writing a very bad performing Z program:
This program is really inefficient. After activation of the SQLM monitoring we run this program a few times.
Now we goto the SQLMD transaction (or from SQLM and then press display data button) to display the SQL monitoring results:
Selection can be done on total number of executions, execution time, amount of records. Result:
You see now the impact of our badly written program. Double click on the line will jump to the ABAP code point.
Creating snapshots
At the bottom of the SQLM start screen there are the buttons to create snapshots:
This results into the Snapshot screen:
You can create a snapshot here for later re-use. You can also download the snapshot to a different system by using these buttons: first export to file:
When you have the file, goto the target system and start SQLM and press create snapshot. Now use the option Create with Data Source File Import.
It is common practice to capture data in production by a basis administrator who exports it. Then the data download is handed over to an ABAP developer using the data as upload in SQLM database in the development system to improve poorly performing Z code. The developer can use the SWLT tool (see blog) to combine the SQLM data with the static code review data taken from the ATC tool (see blog).
Follow up use in SWLT
The SQLM data can be used as input in the SWLT tool: SQL performance worklist tool. This tool combines the SQLM data with the ATC tool results. Read more about SWLT in this blog.
Background information
More background information can be found in OSS note 1885926 – ABAP SQL monitor.
Useful blog (which is start of blog series on SQLM): link.
Impact on performance and memory is minimal. Description is fully documented in OSS note 3100598 – Memory Requirement and Performance Impact of the SQL Monitor.
OSS notes
Relevant OSS notes:
- 2829252 – SQLM: SQL error when downloading SQL Monitor data
- 2831379 – SQL Monitor: Display SQL Trace End Time wrong
- 2843038 – SQLM: Runtime error DATA_LENGTH_0 when activating the SQL Monitor
- 2849183 – Robustness of RSQLM_UPDATE_DATA (Time Series) – Improvements
- 2905354 – SQL Monitor: CONVT_CODEPAGE in SQLM_RTM_UPDATE
- 2915083 – SQLM: COMPUTE_INT_TIMES_OVERFLOW in CL_SQLM_TIME
- 2983805 – SQL Monitor: Improvements to Entity Name resolution
- 3085361 – Conversion error in SQLM data export
- 3113152 – Runtime Monitor: Improve Automatic Deletion of Database Records
SAT ABAP runtime analysis is a great tool for analyzing performance issues. This tool can also be used to analyze ABAP web dynpro and FIORI applications. For more background on SAT tool itself, read this blog.
Questions that will be answered in this blog are:
- How to run SAT tool for ABAP web applications?
Running SAT tool for ABAP web applications
Start transaction SAT, and press the button Schedule in the block For User/Service.
You now reach the measurement overview screen:
Now select the Schedule Measurement button. In the next screen fill out the user to trace and very important: switch the object type to URL and process type to HTTP:
Do not press the schedule measurement button yet. First go to the ABAP web application to the part you want to measure for performance. Afterwards delete the browser, since it will keep on sending data.
No you have to go back to the SAT start screen and click on the tab Evaluate:
Double click on your measurement line. The system will now read the measurement log files and process them. This can take some time. The end result screen looks again like a normal SAT result screen:
Source: https://www.saptechnicalguru.com/tag/performance/
Posted by: quintonquintoncaratherse0272377.blogspot.com
Post a Comment for "Abap Performance Tuning Pdf Free Download"