[go: up one dir, main page]

0% found this document useful (0 votes)
38 views72 pages

04 Slides ST05

The document provides an overview of ABAP tools for performance measurement and analysis, focusing on the Performance Trace (ST05) as a key interface trace tool. It details the steps for recording and analyzing traces to identify performance issues related to resource consumption and application behavior. The document emphasizes the importance of understanding trace types and preparation for effective performance analysis.

Uploaded by

vinay.thambe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views72 pages

04 Slides ST05

The document provides an overview of ABAP tools for performance measurement and analysis, focusing on the Performance Trace (ST05) as a key interface trace tool. It details the steps for recording and analyzing traces to identify performance issues related to resource consumption and application behavior. The document emphasizes the importance of understanding trace types and preparation for effective performance analysis.

Uploaded by

vinay.thambe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

ABAP Tools for Performance Measurements and Analyses

Table of Contents

I. Introduction and Overview


Survey background knowledge.

II. Code Inspector (SCI)


Identify potential performance problems by static analysis.

III. Performance Monitor (STATS)

Approach
Assess an application’s resource consumption.

Oriented
Tools-
IV. Performance Trace (ST05)
Evaluate events that leave the ABAP work process.

V. Runtime Analysis (SAT)


Analyze events within the ABAP work process.

Approach
Problem-
VI. Performance Analysis

Oriented
Combine the tools to analyze an application’s performance.

© 2021 SAP SE. All rights reserved.

1
Performance Trace
ST05

Manfred Mensch
SAP SE
Performance and Scalability
March 01, 2021

2
Abstract

This lesson …
 … introduces the Performance Trace as SAP’s interface trace tool
 … explains that traces capture an application’s requests to external resources
 … shows how to record and analyze traces
 … indicates that traces identify optimization potential

© 2021 SAP SE. All rights reserved.

At the end of this lesson, you will …


• … understand the scope and purpose of the Performance Trace
• … know when to use it
• … know how to use it:
o Prepare test case
o Record trace
o Display trace
o Analyze entire trace
o Investigate individual trace records
• … be able to derive optimization approaches from a trace
(The optimization is not in the scope of this lesson.)

This lesson focusses mainly on SQL traces. This is the most relevant trace type offered by the
Performance Trace.

3
Introduction

The Performance Trace (transaction ST05) is an interface trace.


It records events during application execution that …
 … leave a work process to request data or services from external resources
 … enter a work process to perform services for external callers
Trace types for seven interfaces:
 SQL DB accesses
 Buffer calls to buffered objects handled by application server’s buffers
 Enqueue set or clear SAP business locks
 RFC remote function calls
 HTTP HTTP(S) communication
 APC WebSocket communication
 AMC message exchange via publish/subscribe channels
Analysis of entire trace through several aggregation levels
Detailed investigation of individual trace record via integrated tools

© 2021 SAP SE. All rights reserved.

By default, all trace types are switched off, so that the system’s performance is not impaired.
An SQL trace does not record SQL statements handled by the application server’s table buffer. It
exclusively captures requests that are processed by the database server. DB trace would be a
more appropriate name.

APC ABAP Push Channel


AMC ABAP Message Channel
ABAP Channels support event-based communication via messages between application servers
and with the Internet.
They are documented at
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenabap_channels.htm.

4
Scope and Purpose

Investigate applications with respect to the resources they request from outside of
the work process.
Check adherence to architecture requirements.
Get KPIs mandated by quality requirements.
Identify hot spots in an application
 … expensive SQL statements
 … unnecessary accesses to the persistence layer
 … long running SAP locks
 … RFC issues
Deduce approaches for optimization.

© 2021 SAP SE. All rights reserved.

ST05 is not the appropriate tool if the entire system or the database server is slow.

The optimization of performance problems discovered with the help of ST05 traces is not in the
scope of this lesson.

5
Use of the Performance Trace

Prepare
0
Execute Application

1 a
Activate Trace Recording

Record
b
c
Execute Application
Deactivate Trace Recording

2 a
Trace List (Main Records)

Display
b c d e f g
Individual Structure-Id. Value-Id. Table Trace Sizing
Records Statements Statements Accesses Overview Information

Analyze
3 a b c d e
Statement DDIC DB Explain ABAP Editor Call Stack

© 2021 SAP SE. All rights reserved.

The analysis of an application with the Performance Trace proceeds in four main steps, all of
which have to be executed on the same ABAP application server instance.
Step 0: Execute the application to be traced several times to fill buffers and caches.
Step 1: Record trace.
a) Activate trace recording.
Use filter conditions to restrict its scope.
b) Execute the application.
c) Deactivate trace recording.
Step 2: Display trace.
a) Main Trace Records
b) Detailed Trace Records
c) Structure-Identical Statements
d) Value-Identical Statements¹
e) Table Accesses2
f) Trace Overview
g) Sizing Information
Step 3: Analyze individual statements.
a) Statement details with variable values3
b) DDIC information on the accessed object
c) DB Explain
d) ABAP source code
e) ABAP call stack
Forward trace to Code Inspector to check compliance with architecture requirements.
¹ Only relevant for SQL, BUF, and ENQ trace records.
² Only relevant for SQL and BUF trace records.
3 Values are available only for SQL, BUF and ENQ trace records.

6
Trace Preparation

Prepare
0
Execute Application

Execute the application to fill buffers and caches.


 Measurements without pre-runs are …
o … difficult to reproduce
o … might trigger irrelevant events

© 2021 SAP SE. All rights reserved.

Step 0: Execute the application to be traced several times to fill buffers and caches.

7
Trace Recording

1 a
Activate Trace Recording

Record
b
c
Execute Application
Deactivate Trace Recording

Trace recording is application server instance specific.


 Execute the application on the same instance where the recording was activated.
 Activities on other instances will not be traced, unless you activate the trace there.
 If recording is already active on the instance, it is not possible to start another recording.

Trace data is stored in the application server’s file system.


 Display and analysis must be done on the same instance.
 Long-running trace recordings may overwrite their own data.

© 2021 SAP SE. All rights reserved.

Step 1: Record Trace.


a) Activate trace recording.
Use filter conditions to restrict its scope.
b) Execute the application.
c) Deactivate trace recording.
If the application triggers activities on other instances (e.g., through RFCs), trace
recording must be activated explicitly on those instances.

The kernel saves trace records in dedicated trace files on the application server. The trace files’
base name is determined by the value of profile parameter rstr/filename (e.g.,
/usr/sap/Y4H/D00/log/TRACE).
To minimize the impact on system performance, the records are not written directly to file but
first saved in an internal buffer. Profile parameter rstr/buffer_size_kB (default value 200)
determines this buffer’s size. If the size of a single statement (including its variables’ values)
exceeds this value, it will be truncated.
If the maximum size of the trace file (set by parameter rstr/max_filesize_MB; default value 16,
maximum value 100) is reached, the file is renamed by appending a number between 00 and 99
to the file name. If a file by that name already exists, it will be overwritten. By this mechanism a
trace may overwrite its own beginning if trace recording is active for too long or if the traced
application triggers a large number of recorded events. The maximum number of trace files is
controlled by parameter rstr/max_files (default value 10, maximum value 99).
The current values of these profile parameters can be checked with Edit → Display Profile
Parameters for Trace.

8
Trace Recording
Activate Trace

Trace Types 1

 default: SQL Trace


3
1 4 Stack Trace 2
2
3
Activate Trace 4
 activities of the logon
user will be traced

© 2021 SAP SE. All rights reserved.

An active trace recording can be enhanced by selecting additional trace types and activating the
trace again. Likewise, trace types can be deactivated without completely stopping the trace
recording.
Based on benchmark runs (SD, FI, MM), the average size of a trace record is 880 Bytes and the
overhead for server response time, as well as CPU time, is less than 3%.
If the stack trace is active, the trace records will contain ABAP call stack information so that
during trace analysis the call hierarchy leading to the statement that triggered the trace record
can be retrieved. This is especially helpful for enqueues, which are always set from function pool
SAPLSENA, and also for events encapsulated within frameworks. In both cases, the trigger in the
application coding is accessible by the ABAP call stack. Capturing call stack information takes
~30µs per record and increases the trace record size by ~50%.

9
Trace Recording
Activate Trace with Filter

Trace Types 1

 default: SQL Trace


2
2
1
4
Activate Trace with 3
3
a Filter
b
Filter Conditions for 4
c
Trace Recording
 client, user a

d  instance b

e  transaction xor program c


xor RFC xor URL
 work process number d

 up to 5 tables to be e
included or excluded

© 2021 SAP SE. All rights reserved.

Activate the trace recording with filter when …


• … you want to focus on a particular client.
• … you need to trace events triggered by another user¹.
• … activities on application server instances different than the current instance must be
captured. You can activate tracing on all instances of the system. The ENFORCE option will
unconditionally abort any active tracing and then switch on tracing according to your filter.
• … you know the name of the relevant program, transaction, remotely called function, or URL
and want to avoid tracing irrelevant activities from other sources. At most one of these 4 filters
can be specified¹.
• … you want to understand why an ABAP program occupies a work process for a long time (get
the work process ID from transactions SM50 or SM66).
(A long running database operation that started before the trace was switched on will not
trigger the creation of a trace record.)
• … you are only interested in accesses to at most 5 tables¹ (e.g., because they are the most
relevant for the application under investigation).
• … you are not interested in accesses to at most 5 tables¹ (e.g., because they result in a lot of
trace records that inhibit trace analysis or even lead to an overflow of the kernel trace files).
The program, transaction, RFC, or URL to be traced, as well as the list of tables to be included
or excluded, can be modified while the trace recording is active. The user name pattern must not
be changed while recording a trace.

¹ A closing wildcard is allowed.

10
Trace Recording
Display Filter

Current Trace Status 1


2 2
View Filter Conditions 3
for Trace Recording
3

© 2021 SAP SE. All rights reserved.

The trace status indicates the current settings―including if a running trace was activated with
filter.
The filter conditions can be seen under Edit → Display Filter for Trace Recording.

11
Trace Recording
Deactivate Trace

Trace Types 1

 default: all active trace


2 types
1
3 Deactivate Trace
4 2
 on local instance 3
 on all instances 4

© 2021 SAP SE. All rights reserved.

For an ongoing trace recording with multiple active trace types, selected trace types can be
deactivated without completely switching off the trace recording.
Option Deactivate Trace on All Servers switches off all trace recordings on all application server
instances of the system, regardless of the types and independent of the users who have
activated tracing. Use this option with caution and courtesy toward your colleagues.

12
Trace Administration
Display Trace I

1
Display Trace 2

© 2021 SAP SE. All rights reserved.

You can display a trace only on the application server instance where it was recorded.
Due to load balancing, with a new logon your requests might be processed on another instance.
If you know the instance where your trace was recorded, you can go there with transaction
SM51. Otherwise you have to search the system’s instances until you find your trace. The trace
may have been overwritten in the meantime.

13
Trace Administration
Display Trace Ib

Display Trace with 1

Active Trace Recording


1

© 2021 SAP SE. All rights reserved.

You can display a trace while tracing is still active. The trace recording continues undisturbed.

14
Trace Administration
Display Trace II

Trace Types 1

 default: trace types of


4 previous recording
1
Trace Period 2
5
 default: trace period of
2
previous recording
3 Trace Filter 3

 default: user name of


previous recording
Warning of Incomplete 5
Trace
6
Information on Number 6

of Trace Records

© 2021 SAP SE. All rights reserved.

Trace records to be displayed can be filtered by:


• Trace Types Select the trace type(s) you want to view.
• Trace Period After recording a trace, the default time interval extends from
the time the trace recording was started until it was ended. For
previously recorded traces, specify the time interval manually.
A long running trace recording may have overwritten some of
its own data. In this case, the start of the oldest trace file starts
after the specified trace period. ST05 will detect this and issue
a warning.
• Client Client where the traced activity was executed.
• User Name Name of the user who executed the traced activity.
• Object Name Name of the object (SQL, BUF: table, view; ENQ: lock object;
RFC: function; HTTP: path) that was accessed.
• Duration [Microsecs] Execution time of the operation in microseconds (µs)
• Executed Operation Operation that was executed.
• Database Connection Database connection that was used to access the data.
• Database Connection ID Database connection ID used to process the statement.
• Work Process ID Number of the work process that executed the traced activity.
• Transaction ID Transaction GUID
• Extended Passport Root ID The extended passport identifies requests throughout the SAP
• EPP Connection ID system landscape. The connection ID distinguishes involved
• EPP Connection Counter RFC destinations.
• No. of Trace Recs If more than the specified number of trace records pass the
filter, a popup asks whether you want to continue.
Yes ➔ trace record processing continues
No ➔ records processed so far will be displayed
Cancel ➔ trace evaluation terminates
15
Ensure that you do not miss important information by applying a filter that is too restrictive.
A long running trace recording may have overwritten some of its own data. There are two
options for manually checking that a trace is not missing records at its beginning:
• In System Trace (transaction ST01) look at the list of trace files (Goto -> Administration) and
verify that the start time of the oldest file is before the time when the trace was activated.
This check can be performed without opening the trace and therefore will not waste much
time on an incomplete trace. ST05 executes this check automatically before displaying a
trace.
• Open the trace and ensure that the time of the first trace record is close to the time when the
application was started (which should be close to the time when the trace was activated).
This check is done automatically and will show a warning when it fails.

15
Trace Administration
Display Trace Directory

1
Display Trace Directory 2

© 2021 SAP SE. All rights reserved.

The Trace Directory integrated into ST05 addresses some symptoms caused by the facts that
the storage of trace records is application server instance specific and has a limited capacity.
When trace recording is activated, an entry is written into a database table. It stores the client
from where the recording was started, the name of the user who activated tracing and the date
and time when the trace was switched on. This entry also saves the name of the ABAP
application server instance where the trace is captured. Upon deactivation of trace recording,
this entry is completed with the end date and time. This kind of trace directory entry contains
only header data, it does not store any trace records. Its purpose is to facilitate the recovery of
previously recorded traces in multi instance systems. It does not protect trace records from
overwriting. When the kernel deletes a trace file in the application server’s file system, the
corresponding trace directory entries will be removed.
Traces that must not be overwritten (e.g., because they are needed for documentation or
comparison purposes long after they were recorded) can be stored in the trace directory.

16
Trace Administration
Trace Directory

Trace Selection 1

 default: entries created


1 2 by logon user
Trace Period 2

 default: traces recorded


on current day
3
Directory Entries 3

© 2021 SAP SE. All rights reserved.

Entries in the trace directory can be filtered by some of their meta data, such as owner or
description, and by the trace’s start date.
The trace directory includes both types of entries, those that contain only header data (indicated
by the binary file icon in the first column), and those that also persist the records (identified by
the database icon ). Double-clicking an entry of either type will display the corresponding
records.
The trace directory supports various functions for the administration of its entries:
• For entries that contain only header data, the trace records can be stored in the trace directory
on the database. This will create an additional entry.
• The description and the delete date can be modified.
• Entries can be deleted.
• Export to the local front end can be done in binary format for the entire trace or in CSV format
for a particular aggregation level.
• Traces stored on the local front end in the appropriate binary format can be imported.
• Two traces represented by trace directory entries with persisted trace records can be
compared.

17
Trace Display

2 a
Trace List (Main Records)

Display
b c d e f g
Individual Structure-Id. Value-Id. Table Trace Sizing
Records Statements Statements Accesses Overview Information

Levels of aggregation:
a The list of main records aggregates all individual trace records triggered by distinct events.

b Individual records correspond to technical operations executed while a distinct event is
processed. This is the granularity written by the kernel.
 The list of structure-identical statements summarizes statements with a common structure
c
and adds statistical and technical information.
 In the list of value-identical statements, statements are summarized if their structures and
d
their sets of values coincide.
 The table accesses aggregates trace records by table, statement type, and DB connection.
e

f The trace overview is a highly condensed summary.


 The sizing information estimates the change of the DB data volume.
g

© 2021 SAP SE. All rights reserved.

Step 2: Display trace.


a) Main Trace Records
b) Individual Trace Records
c) Structure-Identical Statements
d) Value-Identical Statements¹
e) Table Accesses2
f) Trace Overview
g) Sizing Information

¹ Only relevant for SQL, BUF, and ENQ trace records.


² Only relevant for SQL and BUF trace records.

18
Trace Display
Main Records

Default sort order by


Time ascending
Duration in µs
Trace types color-coded
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

The processing of statements implemented in an application’s source code may involve several
operations that are captured as individual, detailed records in a trace. The list of main records
attempts to aggregate all these records so that ideally there is a one-to-one correspondence
between main records and implemented statements. Individual records that cannot be
aggregated into a main record are collected into dummy main records with statement OTHER
(<trace_type>) and empty Time.
For SQL statements, all trace records corresponding to database operations triggered by the
statement’s execution are summarized.
Display of a trace best starts with the list of main records. Its default layout shows
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Records1 SQL, BUF: number of records returned by the operation;
ENQ: number of lock granules
• Program Name Name of the ABAP program that called the event
• Object Name Name of the object that was accessed (SQL, BUF: table, view;
ENQ: lock object; RFC: function; HTTP: path)
• Statement Edited statement: field list and FROM clause removed, variable
names replaced by values
• DB Cursor2 Number of the cursor used for the operation
• Array2 Maximum number of records that can be transferred from the
database to the ABAP work process within one communication
package
• DB connection3 SQL: name of the logical database connection (default = R/3);
HTTP: network protocol
• User Name Name of the user who executed the event

19
• Client Client where the event was executed
• WP Type Type of the work process which executed the event
Further fields can be added by changing the ALV’s layout.
1 Not relevant for RFC, HTTP, APC, and AMC trace records.
2 Only relevant for SQL trace records.
3 Only relevant for SQL and HTTP trace records.

19
Trace Display
Individual Records

Default sort order by


Time ascending
Duration in µs
Trace types color-coded
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

The list of individual trace records provides the highest level of detail. It shows all trace records
captured during an application’s execution without any aggregation. Its default layout shows:
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Records1 SQL, BUF: number of records returned by the operation;
ENQ: number of lock granules
• Program Name Name of the ABAP program that called the event
• Object Name Name of the object that was accessed (SQL, BUF: table, view;
ENQ: lock object; RFC: function; HTTP: path)
• Statement Edited statement: field list and FROM clause removed,
variable names replaced by values
• Operation Operation that was executed; RFC, HTTP: Client or Server
• DB Cursor2 Number of the cursor used for the operation
• Array2 Maximum number of records that can be transferred from the
database to the ABAP work process within one communication
package
• Return Code Return code of the executed operation
• DB connection3 SQL: name of the logical database connection (default = R/3);
HTTP: network protocol
• User Name Name of the user who executed the event
• Client Client where the event was executed
• WP Type Type of the work process which executed the event
Further fields can be added by changing the ALV’s layout.
1 Not relevant for RFC, HTTP, APC, and AMC trace records.
2 Only relevant for SQL trace records.
3 Only relevant for SQL and HTTP trace records.

20
Trace Display
Structure-Identical Statements

Default sort order by


Duration descending
Trace types color-coded
Navigation by
 Push button
 Double-click
 Menu entry
Most functions of main
records list available
Navigation to related
main and value-
identical records

© 2021 SAP SE. All rights reserved.

Structure-identical statements share a common structure. For SQL statements, the structure is
determined by the accessed object and the WHERE clause.
The default layout of the list of structure-identical statements displays these columns:
• Executions Total number of executions of the structure-identical statements
• Redundancy Absolute number of redundant value-identical statements
• Identical Relative number of redundant value-identical statements
• Duration Total execution time of the structure-identical statements in µs
• Records Total number of records returned by the structure-identical
statements
• Duration/Execution Average execution time per statement
• Records/Execution Average number of records returned per statement
• Duration/Record Average execution time per record
(Records = 0 ➔ average duration per statement)
• Min. Duration/Record Minimum execution time per record
(Records = 0 ➔ minimum duration of contributing statements)
• Length Nametab record length of the table or view
• Buffer Type Buffer type of the table or view
• Table Type Table type of the table or view
• Object Name Name of the table or view that was accessed
• Statement Edited statement: field list and FROM clause removed
Further fields can be added by changing the ALV’s layout.
Redundant value-identical statements shall be avoided.
A record with many Executions and Records/Execution = 1 points to multiple SELECT SINGLE
statements. These shall be replaced by a more efficient array SELECT.

21
If Min. Duration/Record exceeds 10.000 µs = 10 ms for SELECTs, or 50.000 µs = 50 ms for
INSERTs, UPDATEs, DELETEs, the statement is slow and shall be investigated in detail.
If a statement has been executed multiple times (e.g., Executions ≥ 10), the value of
Duration/Record shall be considered in addition to Min. Duration/Record. Otherwise a single
fast execution may conceal many slow executions. With few executions, a single outlier may
distort the average, but with 10 or more executions, it should be reliable and taken seriously.

21
Trace Display
Value-Identical Statements

Default sort order by


Duration descending
Trace types color-coded
Navigation by
 Push button
 Double-click
 Menu entry
Most functions of main
records list available
Navigation to related
main records

© 2021 SAP SE. All rights reserved.

Value-identical statements are structure-identical statements where identical sets of values are
passed to the variables. This aggregation is available only for SQL, BUF, and ENQ trace
records. These are the only trace types where values are recorded. Value-identical SQL
statements read identical data multiple times from the database and create unnecessary load.
The default layout of the list of value-identical statements displays these columns:
• Executions Total number of executions of the value-identical statements
• Duration Total execution time of the value-identical statements in µs
• Records Total number of records returned by the value-identical
statements
• Duration/Execution Average execution time per statement
• Records/Execution Average number of records returned per statement
• Duration/Record Average execution time per record
(Records = 0 ➔ average duration per statement)
• Min. Duration/Record Minimum execution time per record
(Records = 0 ➔ minimum duration per statement)
• Length Nametab record length of the table or view
• Buffer Type Buffer type of the table or view
• Table Type Table type of the table or view
• Object Name Name of the object that was accessed
• Statement Edited statement: field list and FROM clause removed,
variable names replaced by values
Further fields can be added by changing the ALV’s layout.
Identical data can be read redundantly by statements that are not value-identical―and not even
structure-identical. This is not visible in the list of value-identical statements. All unnecessary
accesses to the persistence layer must be eliminated. This is a more comprehensive demand
than just removing value-identical statements.

22
Trace Display
Table Accesses

For each table, state-


ments of the same type
are aggregated
Default sort order by
Object Name, DB
Connection, Statement
ascending
Trace types color-coded
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

The table accesses display includes only SQL and BUF trace records.
All SQL trace records corresponding to statements of the same type (e.g., SELECT, INSERT,
UPDATE, DELETE) that access an object over the same database connection are aggregated.
Similarly, all BUF trace records triggered by statements that were handled by the table buffer
and that access an object with the same number of key fields are aggregated.
The default layout of the list of table accesses displays these columns:
• Object Name Name of the table or view that was accessed
• Statement Type of statement: SELECT, INSERT, UPDATE, DELETE,
COMMIT, ROLLBACK , …; buffer accesses by number of used
key fields
• DB Connection SQL: name of the logical database connection (default = R/3);
BUF: empty
• Duration Total execution time of the statements in µs
• Records Number of records returned or modified by the statements
• Executions Number of accesses to the object by statements of the
given type

23
Trace Display
Application Component Hierarchy

Table accesses with


 DDIC description
 Grouped by application
component
 Sub totals
(absolute and relative)
Default sort order by
Object Name, DB
Connection, Statement
ascending
Navigation by
 Push button
 Menu entry

© 2021 SAP SE. All rights reserved.

The display of the application component hierarchy enhances the list of the table accesses. It
additionally shows the tables’ DDIC short descriptions, and groups the accessed tables by
application component (levels 0 and 1 are supported; level 0 is the default). For each application
component, absolute and relative subtotals of the number of accesses, number of records, and
duration are given for the statement types (SELECT, INSERT, UPDATE, DELETE, COMMIT,
ROLLBACK, …; buffer accesses by number of used key fields).

24
Trace Display
Trace Overview

• Meta data
• Quality control
• High level summary
• Check of architecture
requirements 12, 13
• Suspicious statements

© 2021 SAP SE. All rights reserved.

The trace overview is a highly condensed summary.


It identifies the system where the trace was recorded and includes some technical information
on this system.
Some checks try to find issues that may be caused by poor test case preparation or execution.
A large discrepancy between the trace period and the time interval between the first and the last
trace records may indicate that the trace is incomplete.

25
Trace Display
Sizing Information

• Summary of changing
SQL statements
• DDIC sizes of
affected tables
• Estimation of data
volume change

© 2021 SAP SE. All rights reserved.

The sizing information estimates how much the traced SQL statements change the data volume
persisted in the database.
It considers only INSERT, DELETE, and MODIFY statements. It determines the line sizes of the
affected tables based on their static DDIC definition. It also takes into account the sizes of the
primary key and the secondary indexes. Based on these sizes, it calculates two estimates for the
change of the data volume persisted in the database caused by the traced application:
1. MODIFY statements are ignored. This assumes that all MODIFY statements captured in the
trace have changed database table entries that already existed before the application’s
execution. It gives a lower limit for the change of the data volume.
2. MODIFY statements are treated like INSERTs. This uses the assumption that none of the
database table entries addressed by MODIFY statements existed before the application’s
execution.

Both estimations only consider table fields whose lengths are statically declared in the DDIC. For
other fields (of data types LRAW, RAW, RAWSTRING, or STRING) no reliable value for the
change of the persisted data volume can be guessed. They are ignored.

26
Trace Analysis

Analyze
3 a b c d e
Statement DDIC DB Explain ABAP Editor Call Stack

Tools for analyzing individual statements


a Detailed information on the statement
b DDIC information for the object accessed by the statement, further navigation to the ABAP
Dictionary
c Execution plan used for the SQL statement
d ABAP source code position from where the statement was called
e ABAP call hierarchy leading to the statement; navigation to respective ABAP source code
Pass SQL trace to Code Inspector to check adherence to architecture requirements.

© 2021 SAP SE. All rights reserved.

Step 3: Analyze individual statements.


a) Statement details with variable values¹
b) DDIC information on the accessed object
c) DB Explain
d) ABAP source code
e) ABAP call stack
Pass entire trace to Code Inspector to check compliance with architecture require-
ments.

¹ Values are available only for SQL, BUF, and ENQ trace records.

27
Trace Analysis
Statement Details

1 SQL statement details


2  Variable names and 1

1
values separately
2  Variable names 2
2 replaced with values

© 2021 SAP SE. All rights reserved.

The statement details show additional information that was captured with the trace records, but
does not fit into any of the tabular displays of all selected records. The structure of the statement
details’ view depends on the type of trace record. For SQL, BUF, and ENQ records, it includes
the variables’ values.
A statement’s details are also available from the lists of structure-identical and value-identical
statements. In case of the structure-identical statements, the variable values are taken from the
statement’s first execution. In the individual trace records list, SQL records corresponding to
some operations (e.g., PREPARE, (RE)OPEN, EXECSTA, EXECSTM), also support the
navigation to the statement’s details. The variable names depend on the database platform.
Oracle uses “:An” (n is the variable’s running number), others use “?”.
The statement details are also accessible by double-click on the statement. For SQL records,
this calls the view with variable names and values shown separately.

28
Trace Analysis
DDIC Information

1 DDIC information for 1

DB and lock objects


1
Navigation to ABAP 2
3
dictionary and keys,
2
indexes

© 2021 SAP SE. All rights reserved.

The DDIC information¹ displays data on the selected object in three areas:
• Technical names in DDIC and on the database²; category; logical storage parameters;
buffering status and type
• Context short description; application component hierarchy; author(s); last editor
• Statistics static nametab record length; date of last optimizer statistics update;
average length of table record and index records
A list with the (primary) key and any (secondary) indexes follows below these areas.

Further information can be accessed through the push buttons:


• Index Fields Display Fields of a selected index (also accessible by clicking name or
description of the index).
• Table Fields Show the object’s definition in the ABAP dictionary (SE11) .
• All Index Fields Display Fields of all indexes of the table.

The DDIC information is available in the list of individual trace records, the display of structure-
and value-identical statements and the list of table accesses. In all cases, it can also be called
by double-click on the object’s name.

¹ Available only for SQL, BUF, and ENQ trace records.


² These names may differ for append structures, pooled tables, and cluster tables.

29
Trace Analysis
Execution Plan

Access path to the data 1


1 on the DB server
1 Navigation to further DB 2
specific tools

© 2021 SAP SE. All rights reserved.

The execution plan is the path by which the database accesses the data requested by the SQL
statement. Its details and its features are highly dependent on the make, model, and version of
the underlying database platform.¹ The overall structure of the display always includes the
statement with variable names, but without actual variable values. This is followed by the
execution plan where typically the individual steps of the access strategy, the used index(es),
and the costs as determined by the database’s cost based optimizer are given. Some database
platforms include statistics (e.g., number of rows in the table, number of distinct values in index
columns) on which the optimizer based its decision.
The execution plan displays how the statement would be executed under the conditions at the
time when it is called. This might be different from the execution plan that was used at the time
when the trace was recorded.
The execution plan can also be called from the list of individual trace records, where it is
available for (RE)OPEN; (RE)EXEC; EXECSTA; and EXECSTM operations, and the displays of
structure- and value-identical statements. Double-click on the cursor ID also navigates to the
execution plan. Depending on the make, model, and version of the database, it may be
supported only for SELECT statements.
For more information, refer to Gahm, Hermann: Explaining the explain plan (SDN blog at
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18169).

¹ The screen shot above is from a system using a SAP HANA RDBMS Version 1 SP8 Rev. 85.

30
Trace Analysis
Execution Plan II

Statement editor 1

1 Execution plan for 2

entered statement
1

© 2021 SAP SE. All rights reserved.

With the execution plan for an SQL statement that was entered manually, the effects of
modifications to the statement’s structure or values on the access path and the estimated costs
can be deduced. This is a valuable tool for tuning slow statements.

31
Trace Analysis
ABAP Source Code

1
Statement’s call position 1

© 2021 SAP SE. All rights reserved.

The source code position from where the statement was called¹ provides context information
and shows how the statement was programmed in ABAP. This is especially helpful for dynamic
SQL statements or for Open SQL statements that were modified by the database interface of the
ABAP work process.
Navigation to the ABAP source code also works from the list of individual trace records, and
from the displays of structure- and value-identical statements. In the lists of main and individual
records, the ABAP source code display can be called by double-clicking the program name. If a
structure- or value-identical statement was called from distinct ABAP source code positions, an
intermediate popup

allows to select the relevant call and to navigate there by double-click.

¹ For RFC, HTTP, and APC server records as well as for AMC consumer records, the called function on the current
server is displayed.

32
Trace Analysis
ABAP Call Hierarchy

ABAP call hierarchy 1


1 leading to statement
1
Navigation to ABAP 2
source code

© 2021 SAP SE. All rights reserved.

If the stack trace was active when the trace was recorded, the trace records contain ABAP call
stack information. From there, the call hierarchy leading to a statement can be retrieved during
trace analysis. This is especially helpful for enqueues which are always set in function pool
SAPLSENA. It is also useful for events encapsulated within frameworks. In both cases, the trigger
in the application coding may be far away from the direct caller of the traced statement.
Navigation to the ABAP source code position will show this immediate caller which does not
contribute to further problem analysis or resolution. The relevant application coding can be
identified in the ABAP call hierarchy and reached by double-click on the associated entry.
Navigation to the ABAP call hierarchy is also possible in the list of individual trace records, and
the display of structure-identical statements. If a structure-identical statement was called from
distinct ABAP source code positions, an intermediate popup like

allows to select the relevant top-level call. Its first call hierarchy is displayed upon double-click.

33
Trace Analysis
Code Inspector

Combine SQL 1

statements with the


1 tables’ DDIC definitions
Check adherence to
programming guidelines
Suggest optimizations

© 2021 SAP SE. All rights reserved.

All trace records can be passed to Code Inspector. It will apply the global check variant
ANALYZE_SQL_TRACE (part of Code Inspector’s standard delivery) to the SQL trace records. It
investigates WHERE clauses for SELECTs, UPDATEs, and DELETEs and analyzes accesses to
buffered tables. This feature extends Code Inspector’s capabilities into the dynamic domain, so
that dynamic SQL statements, as well as database accesses through ADBC are covered. Only
SQL statements that were executed during trace recording are checked. Statements in
alternative paths of the application are not contained in the trace and therefore not inspected.
Trace analysis using Code Inspector is also available from the list of individual trace records and
the display of structure-identical statements.

34
Summary

The Performance Trace is an interface trace. It records events during application


execution whereby the work process communicates with external resources.

Traces …
 … help to check adherence to architecture requirements
 … supply KPIs mandated by quality requirements
 … reveal hot spots in an application
 … indicate where optimization is required

© 2021 SAP SE. All rights reserved.

You should now be able to …


• … identify situations where an ST05 trace helps to determine the root cause of an application’s
poor performance
• … record a trace
• … evaluate a trace
• … analyze a trace record

35
Best Practice
Guidelines for Efficient Use of the Performance Trace

 Keep the trace size small


o Select only relevant trace types
o Use filter conditions for trace recording
o Activate trace recording as late as possible
o Deactivate trace recording as early as possible
 Use the list of structure-identical statements to get an overview
 Analyze …
o … entire SQL trace using Code Inspector
o … statements with redundant executions
o … statements accessing tables whose buffer type is not empty
o … long-running statements
o … statements that access many records
o … statements that are executed often, esp. when they read one record per execution
o … statements where the time per record is large
 Save traces that must not be overwritten

© 2021 SAP SE. All rights reserved.

Keep the trace size as small as possible to minimize the risk of loosing trace records.

36
Further Reading

Books
 Schneider, Thomas: SAP Performance Optimization Guide, SAP Press, 8th edition, 2018
 Gahm, Hermann: ABAP Performance Tuning, SAP Press, 1st edition, 2009
 Boes, Siegfried: Performanceoptimierung von ABAP-Programmen: Wie Sie Ihre SAP-
Anwendung schneller machen, dpunkt Verlag, 1st edition, 2009

SAP Community Blog


 Boes, Siegfried: The SQL Trace (ST05) – Quick and Easy (covers previous ST05 release)

SAPinsider
• Mensch, Manfred: Track Down the Root of Performance Problems with Transaction ST05

Notes
 31511 (Program runs very long: Performance analysis)
 805934 (FAQ: Database time)

© 2021 SAP SE. All rights reserved.

37
Appendix I
Buffer Trace

38
Trace Display
Buffer Trace

Only the detailed trace


list is available
Default sort order by
time ascending
Duration in µs
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

Buffer trace records are always shown in the detailed trace list. The default layout shows these
columns:
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Program Name Name of the ABAP program that called the event
• Object Name Name of the table or view that was accessed
• Operation Operation that was executed (cf. Appendix V)
• Cursor <Not relevant for buffer records>
• Array <Not relevant for buffer records>
• Hits Number of records returned by the operation
• RC Return code of the executed operation
• DB connection <Not relevant for buffer records>
• Statement Encoded statement
The first character indicates the buffer type:
P: single record buffer (partial)
R: full or generic buffer (resident)
M: shared memory
S: shared buffer (Import/Export buffer)
C: CUA buffer
O: OTR buffer
Then the length of the specified keys is given, followed by the key field
values.
Further fields can be added by changing the ALV’s layout.
Buffer traces are seldom used: They very rarely identify optimization potential, but cause
significant overhead and produce huge trace files.

39
Buffer Trace Analysis
Statement Details

1
Buffer statement details 2

1 2

© 2021 SAP SE. All rights reserved.

For buffer statements, the variables’ values are always listed separately.
The buffer operations are listed in Appendix V.
The key length is the total length of all table fields used in the statement’s WHERE clause.
Generic key length is the length of the generic key for generic buffered tables.
For the table fields used in the WHERE clause, name, type, and length are displayed and the
values used in the statement are given.
The statement details are accessible by double-click on the statement.

40
Appendix
Background Information on Table Buffers

Consider buffering frequently accessed DB tables.


Then data is loaded on demand into a buffer in the application server instance’s
shared memory.
From there it can be read much faster than from the DB.
SQL statements to be handled by a table buffer must use the table’s primary key if
the table is single record or generic area buffered.

© 2021 SAP SE. All rights reserved.

41
Appendix
Buffer Loads in SQL and BUF Traces: Single Record Buffer

Fail to read data from 1


buffer (RC = 1024)
Read data from DB 2

1 Load data into buffer 3


2
3
4 Read data from buffer 4

© 2021 SAP SE. All rights reserved.

42
Appendix
Buffer Loads in SQL and BUF Traces: Generic Area Buffer

Fail to read data from 1


buffer (RC = 1024)
Start buffer load 2

1 Read data from DB 3


2
3
4 End buffer load 4

5
Read data from buffer 5

© 2021 SAP SE. All rights reserved.

43
Appendix II
RFC Trace

44
Trace Display
RFC Trace

Only the detailed trace


list is available
Default sort order by
time ascending
Duration in µs
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

RFC trace records are only shown in the detailed trace list. The default layout shows these
columns:
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Program Name Name of the ABAP program that called the function module
• Object Name Source server for server calls
Destination server for client calls
? if it cannot be determined
• Operation Client: the function module was called from the current server
Server: the function module was executed on the current server
• Cursor <Not relevant for RFC records>
• Array <Not relevant for RFC records>
• Hits <Not relevant for RFC records>
• RC <Not relevant for RFC records>
• DB connection <Not relevant for RFC records>
• Statement Encoded statement:
Source server
Destination server
Client or Server
Name of the function module
Amount of data sent in Bytes
Amount of data received in Bytes
Further fields can be added by changing the ALV’s layout.

45
RFC Trace Analysis
Statement Details

1
RFC statement details 2

1 2

© 2021 SAP SE. All rights reserved.

For RFC statements, the actual values passed into or returned by the called function are not
captured in the trace record.
The statement details are accessible by double-click on the statement.

46
Appendix
Background Information on RFCs

SAP’s main interface technique for communication with …


• … other internal modes
• … other instances, servers, or systems
• … the front end
Two types of RFC
• Synchronous RFC
• Asynchronous RFCs (aRFC, qRFC, bgRFC, tRFC)

© 2021 SAP SE. All rights reserved.

47
Appendix III
HTTP Trace

48
Trace Display
HTTP Trace

Only the detailed trace


list is available
Default sort order by
time ascending
Duration in µs
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

HTTP trace records are only shown in the detailed trace list. The default layout shows these
columns:
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Program Name Name of the called service with path
• Object Name Local server
• Operation Client: the service was called from the current server
Server: the service was executed on the current server
• Cursor <Not relevant for HTTP records>
• Array <Not relevant for HTTP records>
• Hits <Not relevant for HTTP records>
• RC HTTP status code
• DB connection TCP/IP protocol (in most cases HTTP or HTTPS)
• Statement Encoded statement:
Request method
HTTP status code with reason phrase
TCP/IP protocol
Hostname with port number where the service was executed
Name of the called service with path
Amount of data sent in Bytes
Amount of data received in Bytes
Further fields can be added by changing the ALV’s layout.

49
HTTP Trace Analysis
Statement Details

1
HTTP statement details 2

1 2

© 2021 SAP SE. All rights reserved.

For HTTP statements, the actual values passed into or returned by the called service are not
captured in the trace record.
The statement details are accessible by double-click on the statement.

50
Appendix
Background Information on HTTPs

SAP systems communicate via standard internet protocols (HTTP, HTTPS, …) by


using the Internet Communication Framework (ICF) of the ABAP application server.
ICF communication combines flexibility and security and requires little effort for
installation and configuration.

© 2021 SAP SE. All rights reserved.

51
Appendix IV
Enqueue Trace

52
Trace Display
Enqueue Trace

Only the detailed trace


list is available
Default sort order by
time ascending
Duration in µs
Navigation by
 Push button
 Double-click
 Menu entry

© 2021 SAP SE. All rights reserved.

Enqueue trace records are only shown in the detailed trace list. The default layout shows these
columns:
• Time Start time of the event in the user’s time zone
• Duration Execution time of the operation in microseconds (µs)
• Program Name Name of the ABAP program that called the function module
• Object Name Name of the lock object
• Operation Lock operation (cf. Appendix V)
• Cursor <Not relevant for ENQ records>
• Array <Not relevant for ENQ records>
• Hits Number of granules
• RC <Not relevant for ENQ records>
• DB connection <Not relevant for ENQ records>
• Statement Granules with:
Lock mode
Table name of the lock object
Lock argument
Further fields can be added by changing the ALV’s layout.
An enqueue trace is useful only in connection with an SQL trace. These traces need to be
analyzed together with the focus on the processing sequence to identify locks that are held too
long (requested too early or released too late).

53
Enqueue Trace Analysis
Statement Details

1
Enqueue statement 2
details
1 2

© 2021 SAP SE. All rights reserved.

For enqueue records, the variables’ values are always listed separately.
The most common enqueue operations are listed in Appendix V.
The statement details are accessible by double-click on the statement.

54
Enqueue Trace Analysis
DDIC Information

Lock object in ABAP 1

dictionary
1

© 2021 SAP SE. All rights reserved.

The DDIC information for an enqueue trace record displays the lock object in the ABAP
dictionary. There are three tabs:
• Attributes Administrative meta data on the lock object
• Tables Name(s) of the table(s) that contain the data records to be locked
There is always at least one table, which is shown in the Primary Table
area. Further tables linked via foreign key relation may be contained in the
Secondary Tables area.
The supported lock modes are listed in Appendix V.
• Lock parameter The lock parameters are defined in relation to the table’s fields. They
determine the highest possible granularity of the locks.
The DDIC information can be called by double-click on the object’s name.

55
Enqueue Trace Analysis
ABAP Source Code

Statement’s call position 1

© 2021 SAP SE. All rights reserved.

The source code position for enqueue statements is most often in routines within the central
enqueue framework (function group SENA in SAP_BASIS). Displaying these routines will not
help with the analysis of enqueue problems. Always record an enqueue trace with an active
stack trace.
Navigation to the ABAP source code is possible by double-click on the program name.

56
Enqueue Trace Analysis
ABAP Call Stack

ABAP call stack leading 1

to statement
1
Navigation to ABAP
source code

© 2021 SAP SE. All rights reserved.

If the stack trace was active at the time of trace recording, the trace records contain ABAP call
stack information. From that, the call hierarchy leading to a statement can be retrieved during
trace analysis. This is especially helpful for enqueues, which are set in function group SENA. The
trigger in the application coding may be far away from the immediate caller of the traced
statement. Navigation to the ABAP source code position will only show this immediate caller
which does not contribute to further problem analysis or resolution. The relevant application
coding can be identified in the ABAP call stack and reached by double-click on the associated
entry.

57
Appendix
Background Information on Enqueues

Enqueues are logical locks. They are required because physical DB locks are too
short-lived to achieve the data consistency objective of business processes with
multiple dialog steps.
The duration of logical locks shall be as short as possible―esp. for central objects
that are accessed frequently.
There are several types of enqueues.

© 2021 SAP SE. All rights reserved.

Enqueue optimization is a prerequisite for a high degree of parallelization of an application,


which in turn is the basis for high concurrency and high data througput.

58
Appendix V
Miscellaneous Tables

59
Appendix
DB Operations

DECLARE Assigns the SQL statement to a new cursor in the work process.
PREPARE Parses the SQL statement and determines the execution plan.
OPEN Passes a set of parameter values into a previously prepared
SELECT statement.
REOPEN Passes a set of parameter values into an SELECT statement that
has been used before.
FETCH Gets the record(s) matching the WHERE clause of the SELECT
statement into the DB interface of the R/3 work process.
LOBSTA Gets BLOB(s) contained in record(s).
EXECSTA Passes a set of parameter values into a previously prepared
statement that modifies the DB object.
EXECSTM Passes a set of parameter values into a previously prepared
statement that modifies the DB object.
REEXEC Passes a set of parameter values into a modifying statement that
has been used before.
© 2021 SAP SE. All rights reserved.

During the PREPARE operation, the database optimizer analyzes the statement to determine
the most efficient execution plan. This does not rely on the variables’ actual values. Parsed SQL
statement and execution plan are stored in the database’s statement cache.
For repeated executions of a scenario, there shall be no DECLARE, PREPARE, and OPEN
operations. Instead the system reuses the previously parsed statement from the cursor cache
and in REOPEN or REEXEC operations only passes the variable values.
Exception: MaxDB always determines the execution plan that is best suited for the actual
parameter values.
Some database platforms fetch and transfer the first data package already with the OPEN or
REOPEN operation.
The database operations serving a given SQL statement depend on the database platform.
MaxDB uses
• EXECSTA for COMMIT, ROLLBACK, TREX accesses
• EXECSTM for INSERT, UPDATE, DELETE, SELECT SINGLE with fully specified primary
key

60
Appendix
Table Types

TRANSP Transparent Table


VIEW Database View
POOL Table Pool
CLUSTER Table Cluster

© 2021 SAP SE. All rights reserved.

In the first years of R/3, databases had a small maximum number of tables that could be created
in the database. Furthermore, in these days disc space was a precious and limited resource.
To work around the insufficient maximum number of tables, the concept of pool tables and table
pools was introduced. Pool tables are multiple logical tables that reside inside one physical
table, the so called table pool.
With cluster tables and table clusters the disc space issue was addressed. Cluster tables are
logical tables that reside inside physical tables, the so called table clusters. On the database
only the table cluster is visible.
From SAP_BASIS 8.00 on, pool and cluster tables are not supported any longer.

61
Appendix
Buffer Operations

LOAD Load data into buffer.


READ SI Get record out of single record buffer.
OPEN Open generic area buffer for read access.
FETCH Get record(s) out of generic area buffer.
CLOSE Close generic area buffer after read access.
RETRIEV Get records out of CUA, Import/Export buffer.
DEL_DIR Delete entry from shared memory or shared buffer.

© 2021 SAP SE. All rights reserved.

There are further, less common buffer operations.

Fully buffered tables are also contained in the generic area buffer.

62
Appendix
Buffer Types

SNG Single Records Buffered


GEN Generic Area Bufferd
FUL Fully Buffered
DESNG Buffering allowed but switched off
Buffering type Single Records Buffered selected
DEGEN Buffering allowed but switched off
Buffering type Generic Area Buffered selected
DEFUL Buffering allowed but switched off
Buffering type Fully Buffered selected
DEACT Buffering allowed but switched off
No buffering type selected
CUST Customizing table (data class = APPL2)
DDIC DDIC table (name starts with DD, name of containing package
starts with S)

© 2021 SAP SE. All rights reserved.

Any statement recorded in an SQL trace accessed the database and did not use the buffer—
regardless of the object’s buffer type.
Ideally an SQL trace does not contain any records with a non-empty value in column BfTp. If the
buffer type is listed as SNG, GEN, FUL, CUST, or DDIC, further investigation of the statement is
required to understand why it bypasses the buffer and to identify possibilities for avoiding these
database accesses. For the other buffer types, either the application needs to be corrected or
the table’s buffer settings should be changed.

63
Appendix
Return Codes

SQL Return codes depend on the DB platform


(cf. Wiki of IMS NW ABAP: DatabaseInterface / NativeSql)
BUF 0 Function executed correctly
64 No (further) record found
256 Table buffer access : Record not available
Other buffer accesses : Object was inserted
1024 Record does not exist in buffer. Buffer is loaded.
ENQ 0 Function executed correctly
2 Collision occurred
8 Internal error
RFC <not used>
HTTP HTTP status codes as defined in RFC2616

© 2021 SAP SE. All rights reserved.

Further return codes for buffer accesses are described in note 626573.

64
Appendix
Enqueue Operations

ENQUEUE Set lock or increase lock counter for the lock object.
DEQUEUE Remove lock or decrease lock counter for the lock object.
DEQ ALL Remove all locks on all lock objects for owner identified by owner
ID or transaction ID.
QUERY Read lock entries from the lock table.
STATIST Read statistics for the enqueue server.

© 2021 SAP SE. All rights reserved.

Further enqueue operations are rarely used and mainly serve administrative or diagnostic
purposes.

The online documentation (F1 help) provides details on enqueue operations.

65
Appendix
Enqueue Modes

E Write Lock
S Read Lock
X Exclusive, not cumulative
O Set Optimistic Lock
R Promote Optimistic Lock; Conversion from '0' to 'E'
U Only Collision Check for Extended Write Lock, as with 'X'
V Only Collision Check for Write Lock, as with 'E'
W Only Collision Check for Read Lock, as with 'S'
C Only Promotion Check for Optimistic Lock, as with 'R'
T Reserved
+ Reserved

© 2021 SAP SE. All rights reserved.

•E The locked data can be read or processed by one user only. A request for
another exclusive lock or for a shared lock will be rejected.
• S Several users can read the same data at the same time, but as soon as a user
edits the data, a second user can no longer access this data. Requests for further
shared locks are accepted, even if they are issued by different users, but
exclusive locks are rejected.
• X Exclusive locks can be requested by the same transaction more than once and
handled successively, but an exclusive, not cumulative lock can only be
requested once by a given transaction. All other lock requests will be rejected.
• O Optimistic locks behave initially like shared locks and can be converted into
exclusive locks.
• R Converts an optimistic lock into an exclusive lock.
• U, V, W, C Checks whether one of the respective locks (‘X', ‘E', ‘S', ‘R') is possible, but does
not set any lock.

66
ABAP Tools for Performance Measurements and Analyses
Table of Contents

I. Introduction and Overview


Survey background knowledge.

II. Code Inspector (SCI)


Identify potential performance problems by static analysis.

III. Performance Monitor (STATS)

Approach
Assess an application’s resource consumption.

Oriented
Tools-
IV. Performance Trace (ST05)
Evaluate events that leave the ABAP work process.

V. Runtime Analysis (SAT)


Analyze events within the ABAP work process.

Approach
Problem-
VI. Performance Analysis

Oriented
Combine the tools to analyze an application’s performance.

© 2021 SAP SE. All rights reserved.

67
Thank You!

Contact information:

Manfred Mensch
Performance and Scalability

68
© 2021 SAP SE. All rights reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
without the express permission of SAP SE. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
changed without prior notice. mentioned herein as well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP company.
Some software products marketed by SAP SE and its distributors contain proprietary
software components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
products and services mentioned herein as well as their respective logos are trademarks or
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft
registered trademarks of Sybase, Inc. Sybase is an SAP company.
Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, All other product and service names mentioned are the trademarks of their respective
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, companies. Data contained in this document serves informational purposes only. National
z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, product specifications may vary.
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, The information in this document is proprietary to SAP. No part of this document may be
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express prior
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, written permission of SAP SE.
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered This document is a preliminary version and not subject to your license agreement or any
trademarks of IBM Corporation. other agreement with SAP. This document contains only intended strategies, developments,
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. and functionalities of the SAP® product and is not intended to be binding upon SAP to any
particular course of business, product strategy, and/or development. Please note that this
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or
document is subject to change and may be changed by SAP at any time without notice.
registered trademarks of Adobe Systems Incorporated in the United States and/or other
countries. SAP assumes no responsibility for errors or omissions in this document. SAP does not
Oracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other items
contained within this material. This document is provided without a warranty of any kind,
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. either express or implied, including but not limited to the implied warranties of
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are merchantability, fitness for a particular purpose, or non-infringement.
trademarks or registered trademarks of Citrix Systems, Inc. SAP shall have no liability for damages of any kind including without limitation direct,
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World special, indirect, or consequential damages that may result from the use of these materials.
Wide Web Consortium, Massachusetts Institute of Technology. This limitation shall not apply in cases of intent or gross negligence.

Java is a registered trademark of Sun Microsystems, Inc. The statutory liability for personal injury and defective products is not affected. SAP has no
control over the information that you may access through the use of hot links contained in
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for these materials and does not endorse your use of third-party Web pages nor provide any
technology invented and implemented by Netscape. warranty whatsoever relating to third-party Web pages.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE in Germany and other
countries.

© 2021 SAP SE. All rights reserved.

69

You might also like