0% found this document useful (0 votes)
15 views95 pages

03 Perf Analysis

The document outlines procedures for proactive and reactive performance management in SAP systems, focusing on responsibilities, response times, and key performance indicators. It details workload analysis strategies, typical performance problems, and tuning measures for both R/3 Basis and Application tasks. Additionally, it provides insights into performance monitors and analysis roadmaps to optimize system performance.

Uploaded by

gmbarrozo
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)
15 views95 pages

03 Perf Analysis

The document outlines procedures for proactive and reactive performance management in SAP systems, focusing on responsibilities, response times, and key performance indicators. It details workload analysis strategies, typical performance problems, and tuning measures for both R/3 Basis and Application tasks. Additionally, it provides insights into performance monitors and analysis roadmaps to optimize system performance.

Uploaded by

gmbarrozo
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/ 95

SAP System Administration

Performance Management

Confidential
Performance Management

Purpose
 Review proactive performance management procedure
 Review reactive performance management procedure

Key Issues
 Responsibilities
 Response times
 Proactive performance management procedures
 Reactive performance management procedures

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 2


Performance Management Content

Subunit 1 Introduction to Workload Analysis

Subunit 2 Performance Analysis Monitors

Subunit 3 R/3 Memory Management

Appendix Analysis Roadmaps

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 3


Key Performance Indicators

Indicator Value Target

Active Users
Avg. Response Time in Dialog Task
Max. Dialog Steps per Hours
Avg. Response Time at Peak Dialog Hour

Max. CPU Utilization on DB Server


Max. Memory Utilization on DB Server
Max. CPU Utilization on Appl. Server
Max. Memory Utilization on Appl. Server

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 4


What is Workload Analysis?

Goal: Optimize system performance

(a) Maximize system-wide throughput


(b) Minimize program response times

Strategy:
(a) Find system-wide throughput bottlenecks and their causes
(b) Find non-optimal program implementation

Method:
Analyze response times with Workload Monitor (Transaction ST03) and other
relevant monitors

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 5


Typical Performance Problems

Poor system-wide response times due to either a system-wide


problem or a more limited problem

Analyze the average system-wide response time


Poor response times for a specific transaction

Analyze the response time of the individual dialog steps


in the transaction

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 6


Typical Tuning Measures

Basis Tuning Application Tuning

Goal: Goal:
Avoid unnecessary workload by
Distribute the given workload optimally to
optimised programs and optimal usage of
avoid performance bottlenecks
applications
Responsible persons:
Responsible persons:
Technical team leader
ABAP developers
System/database administrator
Application consultant
Technical consultant
System/database administrator
Technical consultant

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 7


R/3 Basis Tuning Tasks

Optimize system parameters (S)

R/3 parameters (for example, for memory management)

Database parameters (for example, for database buffer sizes)

Operating system and network parameters

Optimize database disk layout through I/O balancing

Optimization of workload distribution (S)

Number of work processes, background scheduling, log-on groups

Verify hardware sizing by detecting hardware bottlenecks (S)

S: Performed by the R/3 System administrator


© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 8
R/3 Application Tuning Tasks

Find and apply R/3 Notes from OSS (D,S)


Bug fixes, corrections, patches, hints

Optimize the SAP customizing (D)

For example, in SD and PP

Optimize ABAP-coding of customer’s modifications (D)


For example, Z reports, user exits

Create, change or drop indexes (D,S)

Design table buffering (D,S)


S: R/3 System administrator
D: R/3 developer, R/3 application consultant
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 9
Three-Tier Architecture

Presentation Layer Application Layer Database Layer

LAN/WAN
LAN

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 10


Dialog Step: Wait Time

Presentation server Presentation


Layer
Network
Wait queue Dispatcher Application
(memory) Wait time Layer
Work process

...

Network
Database
Layer

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 11


Dialog Step: Roll-in time

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory)
Layer
Work process
Roll buffer Roll memory
Roll-in time
Extended ...
memory

Roll file
Network
Database
Layer

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 12


Dialog Step: Database Time

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Layer
Work process
Roll buffer Roll memory

Extended ...
memory Database
interface
Database time
Roll file
Network
Database Database
process Layer
Database
buffers
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 13
Dialog Step: Access to SAP Buffers

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Layer
Work process
Roll buffer Roll memory

Extended ... R/3 shared pool buffers


memory Database
interface

Roll file
Network
Database Database
process Layer
Database
buffers

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 14


Dialog Step: Response time

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Layer
Work process Response time
Roll buffer Roll memory

Extended ... SAP shared pool buffers


memory Database
interface

Roll file
Network
Database Database
process Layer
Database
buffers

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 15


Dialog Step: Roll out time

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Layer
Work process
Roll buffer Roll memory
Roll out time
Extended ... SAP shared pool buffers
memory Database
interface

Roll file
Network
Database Database
process Layer
Database
buffers

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 16


Summary: Response Time Components

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Wait time Layer
Work process Response time
Roll buffer Roll memory
Roll-in time
Extended ... SAP shared pool buffers
memory Database
interface

Roll file Database request time


Network
Database Database
process Layer
Database
buffers

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 17


CPU Time

Presentation
Layer
Network
Wait queue Dispatcher Application
(memory) Layer
Work process
Roll buffer Roll memory
ABAP processing CPU time
Extended memory ... SAP shared pool buffers
Database
interface

Roll file
Network
Database Database
process Layer
Database
buffers
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 18
Workload Statistics (1)

CPU time

Network

Network
Wait Roll Load Processing time Database time
time in time

Response time
Presentation
Application Server Database Server
Server

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 19


Workload Statistics (2)
Performance: Recent Workload for Server pswdf727
Workload Edit Goto Monitor System Help

Top time Transaction profile Time profile Memory profile Accounting profile
Instance
SAP System TCC First record 10:11:06
Server pswdf727 Last record 10:30:55
Workload
Database calls 101.567
Dialog steps 5.314 Database requests 783.302
Av. CPU time 147,9 ms Time per database request 1,4 ms
Av. response time 657,3 ms Roll-in time 25,6 s
Av. wait time 89,9 ms Roll-out time 26,2 s
Av. load time 80,5 ms Roll wait time 152,5 s
Av. roll time 4,8 ms Roll-ins 4.352
Av. database req. time 207,6 ms Roll-outs 4.164

Task types
Current Dialog Others Total Update Background

R/3 Transaction ST03, the Workload Monitor, summarizes statistics

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 20


Workload Statistics for RFC

CPU time

Network

Network
Wait Roll Load Processing time Roll Database time
time in time time

Response Time
Roll Roll Roll
Presentation in
Server Applicationout
Server wait Database Server

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 21


Initial Analysis Roadmap (1)
Problem symptoms:

Large roll time


Performance
problem? Large load time

Check: Large database


Yes
All Workload request times
transactions on all servers
affected? (Cont.)
Large CPU times
(Average)
No

Program Processing time


analysis much larger than
CPU time

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 22


Initial Analysis Roadmap (2)

Large roll time Problems with R/3 memory management,


CPU bottleneck

Large load time Program buffer, CUA buffer, or screen buffer too small

Large database CPU/memory bottleneck on database server, network


request times problems, expensive SQL statements, database locks,
missing indexes, missing statistics

Large CPU times


(Average) Expensive ABAP processing, for example, processing
large tables, frequent accessing of R/3 buffers

Processing time CPU bottlenecks, network problems,


much larger than communication problems
CPU time

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 23


Analysis Roadmap: Using the Workload Monitor

R/3 Workload Monitor (ST03)


? Wait time > 10% of response time
! General performance problem
? High database time: database time > 40% (response time - wait time)
Detailed analysis of the database
? Processing time > CPU time x 2
Detailed analysis of hardware bottlenecks
? Load time > 50 ms
Detailed analysis of R/3 memory configuration (is the program buffer too small?)
? Roll-in time > 20 ms, or roll-out time > 20 ms
Detailed analysis : R/3 memory configuration (problems with extended memory or
roll buffer)
Transaction Profile (Transaction ST03) sorted by “Response time total”
? Programs with high CPU time: CPU time > 40% (response time - wait time)
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 24
Performance Monitors for the R/3 Basis

Workload Monitor Transaction


ST03

Work Process Operating System Database Setups / Tune


Overview Monitor Monitor Buffers
Transaction Transaction
SM50 / SM66 ST06 Transaction Transaction
ST04 ST02

… Details in the following units


© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 25
Transaction Profile

Workload: Transaction Profile Report


Workload Edit Goto Monitor System Help

Long/short names Graphics Aggregation... Text


Instance
SAP System TCD First record 10:12:23 Date 10.08.1998
Server pswdf727 Last record 10:30:55 Task type Dialog
Sort: Response time Entries: 19

Program Dialog Response time CPU time Wait database time


or Tcode steps tot.(s) avg(ms) tot.(s) avg(ms) avg(ms) tot.(s) avg(ms)

*TOTAL* 3.916 2.181 557 642 164 86 521 133

FB01 1.039 530 510 127 122 84 114 110


VA01 319 333 1.044 113 354 96 69 218
VL02 160 312 1.949 115 718 84 94 585
FBZ1 720 244 339 59 82 107 49 67
VF01 197 168 853 71 358 26 45 229
VL01 240 159 664 53 221 44 45 187
VA05 160 41 257 9 55 142 4 26
MainMenu 65 4 64 1 16 39 0 2
SM50 26 11 436 1 38 127 0 0
ZWRK 12 19 1.608 1 51 0 9 711

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 26


Statistics Records

Workload: Display Statistical Records


Workload Edit Goto Monitor System Help

DB Task/Mem Bytes All details Record Record


Server : pswdf727
Statistic file: E:\usr\sap\TCD\DVEBMGS00\data\stat.DAT
Analyzed time : 10.08.1998 / 10:10:56 - 10.08.1998 / 10:28:51

End Response Memory Wait CPU DB req. Load KB


time Tcod Program User time(ms) used(KB) (ms) (ms) (ms) (ms) transf

10:19 VA01 SAPMV45A SAP_PERF 3.037 5.347 0 1.141 909 480 63,2
10:19 VA01 SAPMV45A SAP_PERF 19.190 5.347 0 1.188 797 7.945 63,2
10:19 VA01 SAPMV45A SAP_PERF 867 1.318 266 78 9 318 32,7

Analysis of time in work process

CPU time 1.188 ms Number Roll ins 1


RFC+CPIC time 0 ms Roll outs 1
Enqueues 2
Response time 19.190 ms
Wait for work process 0 ms Load time Program 7.942 ms
Processing time 10.443 ms Screen 3 ms
Load time 7.945 ms CUA interf. 0 ms
Generating time 0 ms
Roll (in+wait) time 3 ms Roll time Out 5 ms
Database request time 797 ms In 3 ms
Enqueue time 1 ms Wait 0 ms

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 27


Analysis Roadmap: Using the Transaction Profile

R/3 Workload Monitor (ST03)


...

Transaction Profile (Transaction ST03) sorted by “Response time total”


? Programs with high CPU time: CPU time > 40% (response time - wait time)
Detailed analysis with ABAP-Trace
? Programs with high database time (databases time > 40% (response time - wait time)

Detailed analysis of SQL statements

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 28


Performance Monitors for R/3 Applications

Workload Monitor Transaction


ST03

Statistical SQL trace ABAP debugger ABAP trace


records
Transaction Transaction Transaction Transaction
STAD ST05 SE38 SE30

… Details in the following units


© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 29
Work Process Overview

Process Overview
Process Program User session Edit Goto System Help

Exit CPU Refresh Delete session Debugging Detail info


No. Ty. PID Status Reason Start Sem CPU Time Program Cli User Action
0 DIA 1085 running Yes 9 SAPMV45A 900 SAP_PERF
1 DIA 840 running Yes 1 SAPLERFC 900 SAP_PERF Commit
2 DIA 628 running Yes 1 SAPLARFC 900 SAP_PERF Commit
3 DIA 1038 running Yes RSMON000 900 SCHNEIDERT
4 DIA 719 stopped CPIC Yes SAPLARFC
5 DIA 886 waiting Yes
6 DIA 600 waiting Yes
7 DIA 803 waiting Yes
8 DIA 659 waiting Yes
9 DIA 1084 running Yes 9 SAPMV45A 900 SAP_PERF
10 UPD 940 running Yes 1 SAPLV45U 900 SAP_PERF Insert
11 UPD 1086 waiting Yes
12 UPD 520 running Yes 3 RSM13000 900 SAP_PERF
13 UPD 770 running Yes 1 42 SAPLF005 900 SAP_PERF Load rep.
14 ENQ 952 waiting Yes
15 BTC 1005 waiting Yes
16 BTC 1122 waiting Yes
17 SPO 1063 waiting Yes
18 UP2 1041 waiting Yes

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 30


Analysis Roadmap: Using the Work Process Overview

Work Process Overview (Transaction SM50 / SM66)


? Work processes in status “running”?
? Action: “Dir. Read”, “Seq. Read”, “Insert”, “Update”, “Delete”, “Commit”
Detailed analysis of the database
? Action: “Load report”?
Detailed analysis of R/3 memory configuration (program buffer too small?)
? Action: “Roll In” / “Roll Out”?
Detailed analysis of R/3 memory configuration (problems with extended memory or roll buffer)

? Work processes in status “stopped”?


? Reason: “PRIV”?
Detailed analysis of R/3 memory configuration (problems with extended memory or roll buffer)

? Reason: “CPIC”?
Problems with CPIC connections such as "All work processes blocked in destination
? system"?
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 31
Operating System Monitor

Local (pswdf695) / OS monitor: Windows NT


Edit Goto Monitor System Help

Back Refresh display Detail analysis menu OS collector


Tue Jun 30 11:14:47 1998# interval 10 sec.
CPU
Utilization user % 25 Count 4
system % 1 Load average 1 min 0,00
idle % 74 5 min 0,00
System calls/s 1.244 15 min 0,00
Interrupts/s 267 Context switches/s 281
Memory
Physical mem avail KB 1.113.520 Physical mem free KB 622.060
Pages in/s 0 KB paged in/s 0
Pages out/s 16 KB paged out/s 64
Swap
Configured swap KB 2.996.852 Maximum swap-space KB 2.213.888
Free in swap-space KB 834.172 Actual swap-space KB 1.933.312
Disk with highest response time
Name 0 Response time ms 0
Utilization 0 Queue 0
Avg wait time ms N/A Avg service time ms 0
KB transferred/s 0 Operations/s 0

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 32


OS Monitor: TOP CPU Processes
Local (pswdf727) / OS monitor: Windows NT
Edit Goto Monitor System Help

Refresh display Back


Tue Aug 11 10:49:23 1998# interval 10 sec.
Pid Username Command CPU Util CPU Time Resident
Prior.
[%] [s] size [KB]

692 DRWTSN32 31,12 0: 496 8


347 [WP] TCD_00 disp+work 21,94 0:4 98.088 8
324 [WP] TCD_00 disp+work 20,38 1:3 210.428 8
117 ORACLE80 19,92 2:1 221.548 8
346 [WP] TCD_00 disp+work 14,78 0:5 103.464 8
358 [WP] TCD_00 disp+work 12,91 0:4 95.008 8
340 [WP] TCD_00 disp+work 12,60 0:5 109.240 8
403 [WP] TCD_00 disp+work 2,33 0: 26.744 8
433 [WP] TCD_00 disp+work 1,71 0: 13.464 8
2 System 1,55 1: 200 8
321 [DP] TCD_00 disp+work 1,40 0: 4.052 8
94 AWHOST32 0,46 2:5 2.212 8
231 saposcol 0,31 0: 1.744 8

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 33


Setups / Tune Buffers Monitor (1)
Tune Summary (pswdf727_TCD_00)
Tune Edit Goto Environment Monitor System Help

Current parameters Detail analysis menu

System : pswdf727_TCC_00 Tune summary


Date & time of snapshot: 10.08.1998 15:01:00 Startup: 10.08.1998 13:58:38

Buffer Hit rat. Allocat. Free Spc. Dir. size Free dir Swaps DB
[%] [KB] [%] Entries [%] access

Nametab(NTAB)
Table defin. 92,76 5.043 98,93 30.000 98,92 0 391
Field descr. 94,02 3.348 7,91 60.001 89,36 520 403
Short NTAB 88,99 4.848 99,40 60.001 99,82 0 108
Initial rec. 85,54 6.348 97,28 60.001 99,69 0 186

Program 84,06 143.250 48,87 30.000 97,10 11111 2.613


CUA 95,56 5.000 94,22 2.500 98,04 0 49
Screen 95,92 9.766 99,57 4.500 99,13 0 40
Calendar 100,00 488 84,31 200 49,50 0 101

Tables
Generic key 98,67 48.828 93,79 10.000 99,00 0 117
Single rec. 56,01 30.000 99,51 500 96,20 0 0

Export/import 4,35 4.096 98,92 5.000 99,56 0 0

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 34


Setups / Tune Buffers Monitor (2)

Tune Summary (pswdf727_TCD_00)


Tune Edit Goto Environment Monitor System Help

Current parameters Detail analysis menu


System : pswdf727_TCD_00 Tune summary
Date & time of snapshot: 10.08.1998 15:01:00 Startup: 10.08.1998 13:58:38

SAP memory Current use Max. use In memory On disk


[%] [KB] [KB] [KB] [KB]
Roll area 7,07 17.620 19.032 24.000 232.000
Paging area 0,00 0 80 40.320 221.824
Extended Memory 12,00 30.072 250.880 254.976
Heap Memory 0 27.664

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 35


Work Process Overview

Process Overview
Process Program User session Edit Goto System Help

Exit CPU Refresh Delete session Debugging Detail info


No. Ty. PID Status Reason Sem Time Program Cli User Action Table
0 DIA 1085 running 9 SAPLNSR3 900 SAP_PERF Direct Read NRIV
1 DIA 840 running 1 SAPLERFC 900 SAP_PERF Commit
2 DIA 628 running 1 1 SAPLARFC 900 SAP_PERF Load Rep.
3 DIA 1038 running RSMON000 900 SCHNEIDERT
4 DIA 719 stopped CPIC SAPLARFC
5 DIA 886 running SAP_PERF Direct Read D010L
6 DIA 600 waiting
7 DIA 803 running 1 SAPFV45S 900 SAP_PERF Load Rep.
8 DIA 659 waiting
9 DIA 1084 running 9 SAPFV45S 900 SAP_PERF Direct Read D010L
10 DIA 940 running 1 SAPLV45U 900 SAP_PERF Insert
11 UPD 1086 waiting
12 UPD 520 running 3 RSM13000 900 SAP_PERF
13 DIA 770 running 1 42 SAPLF005 900 SAP_PERF Load Rep.
14 ENQ 952 waiting
15 BTC 1005 waiting
16 BTC 1122 running SAPLSWOD 900 SAP_PERF Seq.Read SWOT
17 SPO 1063 waiting
18 UP2 1041 waiting

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 36


Workload Monitor
Performance: Recent Workload for Server pswdf727
Workload Edit Goto Monitor System Help

Top time Transaction profile Time profile Memory profile Accounting profile
Instance
SAP System TCC First record 10:11:06
Server pswdf727 Last record 10:30:55

Workload
Database calls 59.667
Dialog steps 2.376 383.302
Database requests

Av. CPU time 147,9 ms Time per DB request 4,3 ms

Av. response time 1.373,9 ms Roll in time 17,6 s


Av. wait time 394,1 ms Roll-out time 12,2 s
Av. load time 155,8 ms Roll wait time 25,5 s
Av. roll time 10,0 ms Roll-ins 2.164
Av. DB req. time 559,1 ms Roll-outs 2.184

Task types

Current Total Others Dialog Update Background

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 37


Setups / Tune Buffers Monitor
Tune Summary (pswdf727_TCD_00)
Tune Edit Goto Environment Monitor System Help

Current parameters Detail analysis menu


System : pswdf727_TCC_00 Tune summary
Date & time of snapshot: 10.08.1998 15:01:00 Startup: 10.08.1998 13:58:38

Buffer Hitrat. Allocat. Free Spc. Dir. size Free dir Swaps DB
[%] [KB] [%] Entries [%] access
Nametab(NTAB)
Table defin. 99,76 5.043 98,93 30.000 98,92 0 391
Field descr. 98,02 3.348 97,91 60.001 99,36 0 403
Short NTAB 98,99 4.848 99,40 60.001 99,82 0 108
Initial rec. 98,54 6.348 97,28 60.001 99,69 0 186
Program 76,06 111.250 38,87 13.750 96,10 15.186 2.613
CUA 95,56 5.000 94,22 2.500 98,04 0 49
Screen 95,92 9.766 99,57 4.500 99,13 0 40
Calendar 100,00 488 84,31 200 49,50 0 101
Tables
Generic key 98,67 48.828 93,79 10.000 99,00 0 117
Single rec. 56,01 30.000 99,51 500 96,20 0 0
Export/import 4,35 4.096 98,92 5.000 99,56 0 0

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 38


Detailed Analysis of the Program Buffer
Tune: Detail Analysis (pswdf727_TCD_00)
Tune Edit Goto Environment Monitor System Help

Current parameters Buffered objects


System : pswdf727_TCC_00 Program buffer
Date & time of snapshot: 10.08.1998 15:01:00 Startup: 10.08.1998 13:58:38

Efficiency Hitratio % 87,76


Hits 530.729
Requests 608.815
DB access quality % 95,17
DB accesses 80.613
DB accesses saved 1.855.481
Reorgs 0
Size Allocated KB 111.250
Available KB 110.000
Used KB 57.118
Free KB 52.812
Gaps KB 52.652
Directory entries Available 13.750
Used 537
Free 13.213
Swaps Objects swapped 15.186
Frames swapped 0
Resets Total 0

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 39


Reasons for Program Buffer Swaps

Buffer size is too small:

Programs are swapped out, and the reloads cause increasing buffer fragmentation

Solution: Increase buffer size

Frequently changed programs:

Programs are changed frequently and have to be reloaded, causing buffer


fragmentation which reduces the usable buffer area

Solution: Avoid frequent transporting and development in the production system

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 40


R/3 Memory Management

Contents:

R/3 memory areas

R/3 memory allocation


Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 41


R/3 Memory Management

Objectives:

At the end of this unit you will be able to:

Outline the types of memory in R/3 memory management

Explain how these types of memory work together

Use R/3 memory management monitors

Configure parameters as part of R/3 memory management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 42


First Topic in Unit

 R/3 memory areas

R/3 memory allocation


Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 43


R/3 Memory Areas

Users need two


kinds of memory: R/3 Memory

 R/3 buffers R/3 buffers

Memory accessible to all users, for: Extended


WP
 Programs
 Table and field definitions
 Customizing tables

 User context
Memory attached to individual users, for:
WP
 Variables, lists, internal tables
 Administrative data (such as authorizations)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 44


Physical and Virtual Memory

Server
Virtual memory

Physical
memory Operating system paging file* =
operating system swap space

Maximum virtual memory 

physical memory +
operating system swap space
* Do not confuse with R/3 paging !

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 45


R/3 Memory I: Local Memory for Work Processes

Server Local memory


Virtual memory is associated with
Shared memory Local memory individual work
processes

Local Local Local


...
memory memory memory

1:1
Local work process memory is for:
Work Work Work
 Executables process process
...
process
 Data, stack
 Buffer for database transfer
 Local roll area
 Local paging area
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 46
R/3 Memory II: R/3 Buffers

Shared memory is
Server
associated with
Virtual memory
all the processes of
Shared memory Local memory one instance

R/3 buffers

1:n
Work Work Work
...
process process process
R/3 buffers contain global objects for all users and
work processes, such as programs, and
Customizing tables

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 47


R/3 Memory III: Extended Memory

Server
Virtual memory
Shared memory Local memory

Extended
memory

1:n
Extended memory contains Work Work Work
...
user contexts – that is, objects process process process

associated with individual users, such


as variables, lists, and internal tables

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 48


R/3 Memory IV: Heap Memory

Server
Virtual memory Allocated on demand
Shared memory Local memory
Heap memory
Allocated at instance start (temporary)

Local Local ... Local


memory memory memory

1:1
Heap memory:
Work Work Work
 Contains user contexts, for ...
process process process
example, when extended
memory is full
 Is allocated and released
on demand

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 49


R/3 Memory V: Roll Memory

Server
Virtual memory
Shared memory Local memory

Roll buffer

1:n
R/3 roll file Work Work ... Work
process process process
Roll memory contains the initial part of
user contexts

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 50


R/3 Memory VI: Paging Memory

Server R/3 paging memory contains:


Virtual memory  ABAP objects such as extracts
Shared memory  Context-independent
Local memory objects such as exports

R/3 paging
buffer

1:n
Work Work Work
process process ... process
R/3 paging file

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 51


R/3 Memory – System Point of View

Server
Virtual memory
Shared memory Local memory
R/3 buffers
(programs, tables) Heap memory
Roll buffer (temporary)

Extended memory
R/3 Paging (user contexts)
buffer Local Local ... Local
memory memory memory

1:1
1:n
R/3 roll Work Work ... Work
file R/3 paging process process process
file

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 52


R/3 Memory Areas – Summary

The six R/3 memory areas are:


Buffers

Extended memory

Heap memory

Roll memory

R/3 paging memory


Not to be confused with operating system paging!

Local work process memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 53


Next Topic in Unit

R/3 memory areas

R/3 memory allocation


 Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 54


User Context Data

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
work work
Data Data
process 1 for user 1 for user 3
process 2

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 55


Roll out (1)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
work work
Data Data
process 1 for user 1 for user 3
process 2

User 2 cannot overwrite the


user context data of user 1

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 56


Roll Out (2)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Exit
Dialog Dialog
work work
Data
process 1 for user 3
process 2

Data
for user 1

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 57


Roll In

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
work work
process 1 Data process 2
for user 1

Data
for user 3

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 58


Roll Area and Paging Area

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

User context objects such as: –


Dialog Authorizations
Roll – Set/get parameters
work area
process 1 – Internal tables
Paging – Report lists
area Memory for specific
ABAP commands

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 59


Roll Buffer and Paging Buffer

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Roll Roll Dialog


work area Roll buffer area work
process 1 process 2
Paging Paging
area Roll file area

Paging buffer

Paging file

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 60


R/3 Extended Memory

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
work Roll Roll work
process 1 area area process 2
Paging Paging
area area

Extended
memory
(shared)

Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 61
Allocation Concepts – Summary (1)

In R/3 memory management:

- Work processes serve a large number of frontend users

- Each work process must be capable of loading the user context data for
successive frontend users

The roll data and paging data is copied to the roll buffer and paging
buffer and the corresponding files when a user leaves the work
process.

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 62


Allocation Concepts – Summary (2)

R/3 extended memory uses mapping instead of copying and therefore allows:

 Fast access to internal tables and lists through pointers


 Quick context switches
 Usage of hardware with large memory
 Reduced load on CPU and disk

R/3 extended memory requires sufficient physical memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 63


Next Topic in Unit

R/3 memory areas

R/3 memory allocation


Concepts
 Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 64


Allocation Sequence for Dialog WPs (1)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog
Roll
work
1st : A defined initial portion of the roll
area
process 2
Paging
area is used area

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 65


Allocation Sequence for Dialog WPs (2)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog
Roll work
2nd : Extended memory is used
area process
2
until ... Paging
area

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 66


Allocation Sequence for Dialog WPs (3)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog
Roll work
... the extended memory is full area process
or ... 2
Paging
area

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 67


Allocation Sequence for Dialog WPs (4)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog
Roll work
area process 2
... until the user quota is reached
Paging
area

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 68


Allocation Sequence for Dialog WPs (5)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog
Roll
work
area
3rd: The rest of the process 2
roll area is used Paging
area

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 69


Allocation Sequence for Dialog WPs (6)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Roll Dialog
area work
4th: The system is forced process 2
to use local heap memory Paging
area

Heap
memory

Extended
memory
(shared)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 70


Heap Memory and PRIV Mode (1)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
work Roll Roll work
process 1 area area process 2

Paging Paging
area area

Heap
memory

Extended
memory
(shared)

Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 71
Heap Memory and PRIV Mode (2)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Dialog Dialog
Roll Roll
work area area work
process 1 process 2
Paging Paging
area area PRIV mode
Heap
memory
(local)
Extended
memory
(shared)

Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 72
Allocation Sequence for Dialog WPs – Overview

   
Extended memory Heap memory
Roll memory Roll memory:
up to up to
up to remainder of
ztta/roll_extension abap/heap_area_dia
ztta/roll_first ztta/roll_area
or EM exhausted or HM exhausted

Time

Local
memory
Shared
memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 73


Allocation Sequence for Dialog WPs – Summary

The memory allocation strategy for dialog work processes aims to prevent work
processes from allocating R/3 heap memory and thus entering PRIV mode.

When a work process enters PRIV mode, it remains connected to the user until the
user ends the transaction.

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 74


Next Topic in Unit

R/3 memory areas

R/3 memory allocation


Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes

Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 75


Allocation Sequence for Non-Dialog WPs

New strategy
for non-dialog
   
work processes and Extended memory Heap memory
Roll memory Roll memory:
ongoing strategy for up to up to
up to Remainder of
ztta/roll_extension abap/heap_area_dia
dialog work ztta/roll_first ztta/roll_area
or EM exhausted or HM exhausted
processes

Previous
strategy for
  Heap memory
Extended memory
Roll memory
non-dialog work up to up to
up to
processes abap/heap_area_nondia ztta/roll_extension
ztta/roll_area
or HM exhausted or EM exhausted

Local Time
memory

Shared
memory
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 76
Next Topic in Unit

R/3 memory areas

R/3 memory allocation


Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing heap memory

Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 77


Freeing Heap Memory (1)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Roll Roll
Work Work
area Heap memory is released area
process 1 process 2
Paging after use Paging
area area

{ Heap
memory

Extended
memory
(shared)

Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 78
Freeing Heap Memory (2)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Roll area Roll area


Work But used swap space is not Work
process 1 process 2
freed by the operating system Paging
Paging
area area

{ Heap
memory

Extended
memory
(shared)

Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 79
Freeing Heap Memory (3)

1 2 3 4
R/3 user R/3 user R/3 user R/3 user

Work Roll When the limit set in Roll Work


process abap/heaplimit is reached, process
1 Paging the work process is flagged Paging 2
for automatic restart

Extended
memory
(shared)
Swap
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 80
Parameter ABAP/HEAPLIMIT
Memory / swap space

Restart
of WP 1

abap/heaplimit Used memory WP 1


Swap space of WP 1 Swap space WP 2

Used memory for WP 2


t

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 81


Memory Management Parameters
DIA
ztta/roll_first Roll
ztta/roll_area area Roll buffer rdisp/roll_SHM
Heap
memory Roll file
rdisp/roll_MAXFS

abap/heap_area_dia
abap/heap_area_total ztta/roll_extension

Extended
memory
(shared)

em/initial_size_MB

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 82


Analysis Roadmap: R/3 Memory Configuration

Check R/3 memory configuration in the Setups/Tune Buffers monitor (Transaction ST02)

? Many R/3 buffer swaps


If enough physical main memory is available, increase R/3 buffer size

? R/3 extended memory is full if Max. used > 80%In memory


ST02: Detailed analysis of SAP memory using the Mode List
? Single users with very high extended memory consumption
Identify and analyze respective reports/transactions
If enough physical main memory is available, increase R/3 extended memory

? ztta/roll_first > 1024?


ztta/roll_first = 1
? Roll buffer is full if for Roll memory, Max. used > 80%In memory
If enough physical main memory is available,
increase roll buffer (rdisp/ROLL_SHM)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 83


Next Topic in Unit

R/3 memory areas

R/3 memory allocation


Concepts
Allocation sequence for dialog work processes
Allocation sequence for non-dialog work processes
Freeing Heap memory

 Implementing R/3 extended memory

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 84


Zero Administration Memory Management

This strategy simplifies


R/3 memory management by:
Reducing the number of parameters See also
Making manual settings unnecessary R/3 Note 88416
Dynamically allocated extended memory:
Dynamically adapts to users' memory requirements
Allows extended memory to enlarge to em/max_size_MB or until
the operating system paging file is full

New R/3 parameter: PHYS_MEMSIZE


Provides the basis for other memory management parameters
Makes it unnecessary to configure several R/3 memory management parameters – such as
em/initial_size_MB, and abap/heap_area_total

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 85


Summary of this Unit

Now you are able to:

Outline the types of memory affected by R/3 memory management

Explain how these types of memory work together

Use R/3 memory management monitors

Configure parameters as part of R/3 memory management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 86


Appendix: Menu Paths for R/3 Memory Management

R/3 memory consumption:

From the R/3 initial screen, choose Tools  Administration  Monitor 


Performance  Setup/Buffers  Buffers
(or use the Setups/Tune Buffers monitor, Transaction ST02).

Current parameters:

In the Setups/Tune Buffers monitor (Transaction ST02), double-click Extended


memory, and choose Mode List  Current parameter.

Mode list:

In the Setups/Tune Buffers monitor (Transaction ST02), double-click Extended


memory, and choose Mode list.

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 87


Analysis Roadmap: Using the Workload Monitor

R/3 Workload Monitor (ST03)


? Wait time > 50 ms or processing time > CPU time x 2
! General performance problem
? High database time: database time > 40% (response time - wait time)
Detailed analysis of the database
? Processing time > CPU time x 2
Detailed analysis of hardware bottlenecks
? Load time > 50 ms
Detailed analysis of R/3 memory configuration (is the program buffer too small?)
? Roll-in time > 20 ms, or roll-out time > 20 ms
Detailed analysis : R/3 memory configuration (problems with extended memory or
roll buffer)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 88


Analysis Roadmap: Using the Transaction Profile

Workload Monitor (Transaction ST03) for all task types dialog, and update

Choose Transaction Profile and sort by Response time total


? Programs with large CPU time: > 40% (response time - wait time)
Detailed analysis with ABAP trace (Transaction SE30)
? Programs with lengthy database time: > 40% (response time - wait time)

For programs with a lengthy database time, in ST03, choose Statistics records
? Do the statistics records indicate changes to buffered tables (with Note: Tables were
saved in the table buffer)?
Analyze table buffering using Table Call Statistics (Transaction ST10)
Analyze SQL statements using an SQL trace (Transaction ST05)

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 89


Analysis Roadmap: Using the Work Process Overview (2)

Work Process Overview (Transaction SM50 or Transaction SM66)


? Work process in status running
? Action/reason: “Dir. Read”, “Seq. Read”, “Insert”, “Update”, “Delete” , “Commit”
Database Lock Monitor (Transaction DB01)
? Wait situations due to database locks (“Exclusive lock waits”)?
Analyse lock holder
Database process monitor (Transaction ST04: ORACLE Session)
Detailed analysis: SQL statement

SQL Trace (Transaction ST05)


Identify and analyse the SQL statement in detail

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 90


Analysis Roadmap: Using the Operating System Monitor
Operating System Monitor (Transaction ST06)

? High CPU utilization (< 35% CPU idle)?

? Is there CPU capacity on other servers that is idle?


Redistribute R/3 work processes and users

Operating System Monitor (Transaction ST06): Top CPU Processes

? R/3 work processes with high CPU utilization?


Work Process Overview (Transaction SM50) or Systemwide Work Process Overview (Transaction
SM66)
Detailed analysis of report or transaction
? Database processes with high CPU utilization?
Database process monitor (Transaction ST04; for example ORACLE session)

Detailed analysis of SQL statements

? External processes with high CPU utilization?

Stop or redistribute
? High paging rate (> 20% of RAM per hour)?

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 91


Analysis Roadmap: Using the Operating System Monitor

Operating System Monitor (Transaction ST06)


? High CPU utilization?
...

? High paging rate (> 20% of RAM per hour)?


? Memory capacity free on other servers?
Redistribute R/3 work processes and users
? File system cache > 10 % of RAM?
Reduce file system cache
Setups/Tune Buffers monitor (Transaction ST02): Mode List
? Programs / transactions with high memory consumption
Detailed analysis of report or transaction

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 92


Analysis Roadmap: Using Table Call Statistics

Call the monitor Table Call Statistics (Transaction ST10)

? Are there buffered tables with a high number of invalidations?


Consider the buffering rules – should tables be unbuffered?
? Are there buffered tables with a large buffer size?
Consider the buffering rules – should tables be unbuffered?
? Are there buffered tables with a high number of “Rows affected” in the database?
Consider the buffering rules – should tables be unbuffered?
? Unbuffered tables with many “Total ABAP Processor requests”?
Consider the buffering rules – should tables be buffered?

© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 93


Tuning Roadmap: SQL statements

Detailed analysis of SQL statement


? How many records are transferred?
Optimize ABAP coding
Use EXPLAIN
? Is the optimal index used?
Special database tuning methods
? An optimal index exists but is not used by the optimizer?
? Are table statistics up-to-date?
Refresh statistics
? WHERE clause of SQL statement too complex?
Rewrite WHERE clause
? Are there missing indexes?
Recreate missing indexes
? Are the new indexes reasonable?
Create new indexes
© 2014 SAP SE or an SAP affiliate company. All rights reserved. Confidential 94
Thank You!

© 2014 SAP SE or an SAP affiliate company. All rights reserved.

You might also like