3. Contents
Course Overview......................................................................................................................................................................1
Target Group ........................................................................................................................................................................2
Course Prerequisites............................................................................................................................................................3
Course Goals ........................................................................................................................................................................4
Course Composition............................................................................................................................................................5
TABCUO - Sections...........................................................................................................................................................6
TABCNS - Sections............................................................................................................................................................7
TABCNO - Sections...........................................................................................................................................................8
Section: Workload Analysis ...................................................................................................................................................9
Introduction to Workload Analysis ................................................................................................................................10
Introduction to Workload Analysis ............................................................................................................................11
Introduction: Performance Bottlenecks .....................................................................................................................12
Typical Tuning Measures ............................................................................................................................................13
R/3 Basis Tuning Tasks ...............................................................................................................................................14
R/3 Application Tuning Tasks ....................................................................................................................................15
Multi-Tier Client/ Server Architecture ......................................................................................................................16
Dialog Step: Wait Time ...............................................................................................................................................17
Dialog Step: Roll-in time .............................................................................................................................................18
Dialog Step: Database Time ........................................................................................................................................19
Dialog Step: Access to SAP Buffers..........................................................................................................................20
Dialog Step: Response time ........................................................................................................................................21
Dialog Step: Roll out time ...........................................................................................................................................22
Summary: Response Time Components ...................................................................................................................23
CPU Time .......................................................................................................................................................................24
Workload Statistics (1).................................................................................................................................................25
Workload Statistics (2).................................................................................................................................................26
Initial Analysis Roadmap (1) ......................................................................................................................................27
Initial Analysis Roadmap (2) ......................................................................................................................................28
Analysis Roadmap: Using the Workload Monitor..................................................................................................29
Performance Monitors for the R/3 Basis ...................................................................................................................30
Transaction Profile ........................................................................................................................................................31
Statistical Records.........................................................................................................................................................32
Analysis Roadmap: Using the Transaction Profile .................................................................................................33
Performance Monitors for R/3 Applications............................................................................................................34
Availability of the New Workload Transactions.....................................................................................................35
Workload Statistics (until 4.6B) .................................................................................................................................36
Transaction Profile (until 4.6B) ..................................................................................................................................37
Summary of this Unit ...................................................................................................................................................38
Performance Analysis Monitors......................................................................................................................................39
Performance Analysis Monitors .................................................................................................................................40
Performance Monitors for the R/3 Basis ...................................................................................................................41
Work Process Overview...............................................................................................................................................42
Analysis Roadmap: Using the Work Process Overview ........................................................................................43
Operating System Monitor ..........................................................................................................................................44
OS Monitor: TOP CPU Processes..............................................................................................................................45
Setups / Tune Buffers Monitor (1).............................................................................................................................46
Setups / Tune Buffers Monitor (2).............................................................................................................................47
Getting Started Exercise...............................................................................................................................................48
Workload Analysis Exercise.......................................................................................................................................49
Work Process Overview...............................................................................................................................................50
Workload Monitor.........................................................................................................................................................51
Setups / Tune Buffers Monitor...................................................................................................................................52
Poor Configuration Example .......................................................................................................................................53
Optimal Configuration .................................................................................................................................................54
Workload Monitor.........................................................................................................................................................55
Setup / Tune Buffers Monitor.....................................................................................................................................56
Reasons for Program Buffer Swaps...........................................................................................................................57
Summary of this Unit ...................................................................................................................................................58
R/3 Memory Management ...............................................................................................................................................59
R/3 Memory Management...........................................................................................................................................60
R/3 Memory Management...........................................................................................................................................61
First Topic in Unit .........................................................................................................................................................62
4. R/3 Memory Areas........................................................................................................................................................63
Physical and Virtual Memory .....................................................................................................................................64
R/3 Memory I: Local Memory for Work Processes................................................................................................65
R/3 Memory II: R/3 Buffers ........................................................................................................................................66
R/3 Memory III: Extended Memory ..........................................................................................................................67
R/3 Memory IV: Heap Memory .................................................................................................................................68
R/3 Memory V: Roll Memory ....................................................................................................................................69
R/3 Memory VI: Paging Memory ..............................................................................................................................70
R/3 Memory - System Point of View........................................................................................................................71
R/3 Memory Areas - Summary...................................................................................................................................72
Next Topic in Unit ........................................................................................................................................................73
User Context Data.........................................................................................................................................................74
Roll Out (1) ....................................................................................................................................................................75
Roll Out (2) ....................................................................................................................................................................76
Roll In..............................................................................................................................................................................77
Roll Area and Paging Area..........................................................................................................................................78
Roll Buffer and Paging Buffer....................................................................................................................................79
R/3 Extended Memory .................................................................................................................................................80
Allocation Concepts - Summary (1) ..........................................................................................................................81
Allocation Concepts - Summary (2) ..........................................................................................................................82
Next Topic in Unit ........................................................................................................................................................83
Allocation Sequence for Dialog WPs (1)..................................................................................................................84
Allocation Sequence for Dialog WPs (2)..................................................................................................................85
Allocation Sequence for Dialog WPs (3)..................................................................................................................86
Allocation Sequence for Dialog WPs (4)..................................................................................................................87
Allocation Sequence for Dialog WPs (5)..................................................................................................................88
Allocation Sequence for Dialog WPs (6)..................................................................................................................89
Heap Memory and PRIV Mode (1)............................................................................................................................90
Heap Memory and PRIV Mode (2)............................................................................................................................91
Allocation Sequence for Dialog WPs - Overview...................................................................................................92
Allocation Sequence for Dialog WPs - Summary ...................................................................................................93
Next Topic in Unit ........................................................................................................................................................94
Allocation Sequence for Non-Dialog WPs ...............................................................................................................95
Next Topic in Unit ........................................................................................................................................................96
Freeing Heap Memory (1) ...........................................................................................................................................97
Freeing Heap Memory (2) ...........................................................................................................................................98
Freeing Heap Memory (3) ...........................................................................................................................................99
Parameter ABAP/HEAPLIMIT...............................................................................................................................100
Memory Management Parameters ..........................................................................................................................101
Demonstration: Testing Memory Limits (1) .........................................................................................................102
Demonstration: Testing Memory Limits (2) .........................................................................................................103
R/3 Memory Consumption.......................................................................................................................................104
Mode List.....................................................................................................................................................................105
Work Process Overview............................................................................................................................................106
Analysis Roadmap: R/3 Memory Configuration..................................................................................................107
Workload Analysis Exercise....................................................................................................................................108
Workload Analysis Exercise: Solution...................................................................................................................109
Insufficient Extended Memory ................................................................................................................................110
Sufficient Extended Memory ...................................................................................................................................111
Next Topic in Unit .....................................................................................................................................................112
Zero Administration Memory Management..........................................................................................................113
R/3 Extended Memory on UNIX (1)......................................................................................................................114
R/3 Extended Memory on UNIX (2)......................................................................................................................115
Benefits of 64-Bit Address Space for R/3..............................................................................................................116
R/3 Extended Memory on NT..................................................................................................................................117
Summary of this Unit ................................................................................................................................................118
Appendix: Menu Paths for R/3 Memory Management .......................................................................................119
Hardware Capacity Verification ..................................................................................................................................120
Hardware Capacity Verification..............................................................................................................................121
Hardware Capacity Verification..............................................................................................................................122
First Topic in Unit ......................................................................................................................................................123
What is a Hardware Bottleneck? .............................................................................................................................124
Hardware Bottlenecks ...............................................................................................................................................125
Next Topic in Unit .....................................................................................................................................................126
Hardware Analysis Roadmap (1) ............................................................................................................................127
5. Hardware Analysis Roadmap (2) ............................................................................................................................128
Response Time Components ....................................................................................................................................129
Hardware Analysis Roadmap (3) ............................................................................................................................130
Workload Analysis Exercise....................................................................................................................................131
Exercise Analysis: Work Process Overview .........................................................................................................132
Exercise Analysis: Workload Monitor...................................................................................................................133
Exercise Analysis: Operating System Monitor.....................................................................................................134
Exercise Analysis: Top CPU Processes .................................................................................................................135
Exercise Analysis: Conclusion (1)..........................................................................................................................136
Exercise Analysis: Conclusion (2)..........................................................................................................................137
Checking Tuning Results (1) ...................................................................................................................................138
Checking Tuning Results (2) ...................................................................................................................................139
Checking Tuning Results (3) ...................................................................................................................................140
Next Topic in Unit .....................................................................................................................................................141
Optimizing Memory Configuration (1) ..................................................................................................................142
Optimizing Memory Configuration (2) ..................................................................................................................143
Checking R/3 Virtual Memory Allocation ............................................................................................................144
Configuring CPU (1) .................................................................................................................................................145
Configuring CPU (2) .................................................................................................................................................146
Summary of this Unit ................................................................................................................................................147
Appendix: 32 Bit Configuration Example (1) .......................................................................................................148
Appendix: 32 Bit Configuration Example (2) .......................................................................................................149
Appendix: Quick Sizing (1) .....................................................................................................................................150
Appendix: Quick Sizing (2) .....................................................................................................................................151
Appendix: Quick Sizing (3) .....................................................................................................................................152
Appendix: Quick Sizing (4) .....................................................................................................................................153
Expensive SQL Statements...........................................................................................................................................154
Expensive SQL Statements ......................................................................................................................................155
Expensive SQL Statements ......................................................................................................................................156
Topics Covered Elsewhere .......................................................................................................................................157
First Topic in Unit ......................................................................................................................................................158
What is an Expensive SQL Statement?..................................................................................................................159
Consequences of Expensive SQL Statements.......................................................................................................160
Next Topic in Unit .....................................................................................................................................................161
Detecting Expensive SQL Statements....................................................................................................................162
Monitors for Detection and Analysis......................................................................................................................163
Detection Using the Transaction Profile ................................................................................................................164
Detection Roadmap (1) .............................................................................................................................................165
Detection Using the Work Process Overview.......................................................................................................166
Detection Using the Database Monitor..................................................................................................................167
Detection Using the Database Process Monitor....................................................................................................168
Detection Using the Database Lock Monitor........................................................................................................169
Detection Roadmap (2) .............................................................................................................................................170
Monitoring Buffer Gets / Disk Reads (1)...............................................................................................................171
Monitoring Buffer Gets / Disk Reads (2)...............................................................................................................172
Monitoring Buffer Gets / Disk Reads (3)...............................................................................................................173
Detection Using the SQL Trace (1) ........................................................................................................................174
Detection Using the SQL Trace (2) ........................................................................................................................175
Detection Using the Where-Used List....................................................................................................................176
Detection Roadmap (3) .............................................................................................................................................177
SQL Statement Exercise (1) .....................................................................................................................................178
SQL Statement Exercise (2) .....................................................................................................................................179
Exercise Solution for 1st SQL Statement...............................................................................................................180
Exercise Solution for 2nd SQL Statement.............................................................................................................181
Next Topic in Unit .....................................................................................................................................................182
Two Types of Expensive SQL Statements ............................................................................................................183
Detailed Analysis of Expensive SQL Statements.................................................................................................184
Detailed Analysis of Expensive SQL Statements.................................................................................................185
Index Use in SQL Statements (1) ............................................................................................................................186
Index Use in SQL Statements (2) ............................................................................................................................187
Index Use in SQL Statements (3) ............................................................................................................................188
Rules for Creating a Secondary Index (1)..............................................................................................................189
Rules for Creating a Secondary Index (2)..............................................................................................................190
Additional Tips for Creating a Secondary Index..................................................................................................191
Optimizer Determination of Access Path...............................................................................................................192
6. Table Statistics for the Optimizer............................................................................................................................193
Checking the Optimizer using EXPLAIN .............................................................................................................194
Why Optimizer Decisions May Cause Performance Problems ..........................................................................195
Tips for Optimizing ABAP Coding (1) ..................................................................................................................196
Tips for Optimizing ABAP Coding (2) ..................................................................................................................197
Detection Roadmap (3) .............................................................................................................................................198
Tuning Roadmap ........................................................................................................................................................199
Workload Analysis Exercise....................................................................................................................................200
Workload Analysis Exercise: Detection ................................................................................................................201
Workload Analysis Exercise: Solution...................................................................................................................202
Before-and-After Comparison.................................................................................................................................203
Summary of this Unit ................................................................................................................................................204
Appendix1: Optimizing ABAP Database Programming.....................................................................................205
ABAP Database Programming ................................................................................................................................206
Creating Efficient SQL Statements.........................................................................................................................207
Tuning Checklist for ABAP Coding (1) ................................................................................................................208
Tuning Checklist for ABAP Coding (2) ................................................................................................................209
Tuning Checklist for ABAP Coding (3) ................................................................................................................210
Appendix 2: Database Locks and R/3 Enqueues..................................................................................................211
Exclusive Lock Waits (1) .........................................................................................................................................212
Exclusive Lock Waits (2) .........................................................................................................................................213
Exclusive Lock Waits (3) .........................................................................................................................................214
R/3 Enqueues versus Database Locks ....................................................................................................................215
Using R/3 Enqueues and Database Locks..............................................................................................................216
Locking and Performance.........................................................................................................................................217
OS Monitor and Top CPU Processes......................................................................................................................218
The Database Process Monitor................................................................................................................................219
R/3 Table Buffering .......................................................................................................................................................220
R/3 Table Buffering...................................................................................................................................................221
R/3 Table Buffering...................................................................................................................................................222
First Topic in Unit ......................................................................................................................................................223
Table Buffers in R/3 ..................................................................................................................................................224
Why Use Table Buffe rs in R/3? (1) ........................................................................................................................225
Why Use Table Buffers in R/3? (2) ........................................................................................................................226
Table Buffering Types...............................................................................................................................................227
Buffer Synchronization (1) .......................................................................................................................................228
Buffer Synchronization (2) .......................................................................................................................................229
Buffer Synchronization (3) .......................................................................................................................................230
Granularity of Invalidation .......................................................................................................................................231
Setting the Buffering for a Table .............................................................................................................................232
SQL Statements Bypassing the Buffer (1).............................................................................................................233
SQL Statements Bypassing the Buffer (2).............................................................................................................234
SQL/Buffering Exercise............................................................................................................................................235
SQL/Buffering Exercise Solution (1) .....................................................................................................................236
SQL/Buffering Exercise Solution (2) .....................................................................................................................237
SQL/Buffering Exercise Solution (3) .....................................................................................................................238
SQL/Buffering Exercise Solution (4) .....................................................................................................................239
SQL/Buffering Exercise Solution (5) .....................................................................................................................240
SQL/Buffering Exercise Solution (6) .....................................................................................................................241
SQL/Buffering Exercise Solution (7) .....................................................................................................................242
SQL/Buffering Exercise: 2nd Run of ZZBUFFER.............................................................................................243
Next Topic in Unit .....................................................................................................................................................244
Buffering Strategy: Technical Criteria ...................................................................................................................245
Buffering Strategy: Application Criteria ................................................................................................................246
Buffering Strategy: Condition Tables.....................................................................................................................247
Buffering Optimization .............................................................................................................................................248
Next Topic in Unit .....................................................................................................................................................249
Analysis Roadmap: Using the Transaction Profile ..............................................................................................250
Table Call Statistics (Transaction ST10) ...............................................................................................................251
Analysis Roadmap: Using Table Call Statistics ...................................................................................................252
Detection Roadmap: Monitoring Table Buffering ...............................................................................................253
Example: Monitoring Table Buffering...................................................................................................................254
Example: Table Analysis (1)....................................................................................................................................255
Example: Table Analysis (2)....................................................................................................................................256
Example: SQL Cursor Cache...................................................................................................................................257
7. Summary......................................................................................................................................................................258
Appendix: ATP Server..............................................................................................................................................259
Introduction: Availability Checks with ATP Logic .............................................................................................260
First Topic in Appendix............................................................................................................................................261
Material Locking (1)..................................................................................................................................................262
Material Locking (2)..................................................................................................................................................263
Database Accesses .....................................................................................................................................................264
Next Topic in Appendix............................................................................................................................................265
Overview of ATP Related Techniques...................................................................................................................266
Locking with Quantities (1) .....................................................................................................................................267
Locking with Quantities (2) .....................................................................................................................................268
ATP Server (1)............................................................................................................................................................269
ATP Server (2)............................................................................................................................................................270
ATP Server (3)............................................................................................................................................................271
Next Topic in Appendix............................................................................................................................................272
Monitoring the Export/Import Buffer.....................................................................................................................273
Monitoring R/3 Enqueues.........................................................................................................................................274
Monitoring SQL Statements.....................................................................................................................................275
Setting ATP Server Parameters ...............................................................................................................................276
Interface Monitoring ......................................................................................................................................................277
Interface Monitoring..................................................................................................................................................278
Processing Modes.......................................................................................................................................................279
mySAP.com Interfaces..............................................................................................................................................280
Remote Function Calls (RFCs)................................................................................................................................281
'Simple’ Transaction Step.........................................................................................................................................282
Transaction Step with Synchronous RFC..............................................................................................................283
RFC Monitoring : Statistical Records.....................................................................................................................284
RFC Monitoring : Statistical Sub-Records (1) ......................................................................................................285
RFC Monitoring : Statistical Sub-Records (2) ......................................................................................................286
RFC Monitoring: RFC Destinations.......................................................................................................................287
RFC Monitoring: Performance Trace .....................................................................................................................288
Next Topic in Unit .....................................................................................................................................................289
R/3 Release 4.6: Enjoy SAP.....................................................................................................................................290
Interaction Model: Controls Technology...............................................................................................................291
Interaction Model: Implications for Performance ................................................................................................292
Transaction Step with Roundtrip .............................................................................................................................293
Example (I): ST03 - High Roll Wait Time ............................................................................................................294
Example (II): STAD - Statistical Record ...............................................................................................................295
RFC Monitoring: Performance Trace .....................................................................................................................296
Trouble Shooting : High GUI Time ........................................................................................................................297
Example (III): ST06 - Network Check by Ping ....................................................................................................298
Trouble Shooting : High GUI Time (2)..................................................................................................................299
Trouble Shooting: New Visual Design...................................................................................................................300
Trouble Shooting: LOW Speed Connection..........................................................................................................301
Trouble Shooting: SAP Easy Access Menu..........................................................................................................302
Next Topic in Unit .....................................................................................................................................................303
Remote Function Calls (RFC and aRFC) ..............................................................................................................304
Troubleshooting: Incoming RFC Load (Problem) ...............................................................................................305
Troubleshooting: Incoming RFC Load (Monitoring)..........................................................................................306
Troubleshooting: Incoming RFC Load (Solution) ...............................................................................................307
Troubleshooting: Outgoing RFC Load (Monitoring) ..........................................................................................308
Troubleshooting: High RFC Load...........................................................................................................................309
Remote Function Calls: tRFCs ................................................................................................................................310
Next Topic in Unit .....................................................................................................................................................311
Workload Analysis Exercise....................................................................................................................................312
Exercise: Work Process Monitor.............................................................................................................................313
Exercise: User Overview ..........................................................................................................................................314
Exercise: Workload Monitor (RFC Profile) ..........................................................................................................315
Exercise: Transactional RFC Monitor....................................................................................................................316
Conclusion | Appendix..................................................................................................................................................317
Conclusion...................................................................................................................................................................318
Further Documentation .............................................................................................................................................319
Analysis Roadmap: Using the Workload Monitor...............................................................................................320
Analysis Roadmap: Using the Transaction Profile ..............................................................................................321
Analysis Roadmap: Using the Work Process Overview (1) ...............................................................................322
8. Analysis Roadmap: Using the Work Process Overview (2) ...............................................................................323
Analysis Roadmap: Using the Operating System Monitor (1)...........................................................................324
Analysis Roadmap: Using the Operating System Monitor (2)...........................................................................325
Analysis Roadmap: R/3 Memory Configuration..................................................................................................326
Analysis Roadmap: Using Table Call Statistics ...................................................................................................327
Section: Technical Optimization of ALE Processing...................................................................................................328
Technical Optimization of ALE Processing..............................................................................................................329
Goals.............................................................................................................................................................................330
Intent of ALE..............................................................................................................................................................331
Distributing Data ........................................................................................................................................................332
Business Scenario.......................................................................................................................................................333
Typical Scenario .........................................................................................................................................................334
Technical Background of ALE ....................................................................................................................................335
How ALE Works - Step 1.........................................................................................................................................336
How ALE Works - Step 2.........................................................................................................................................337
How ALE Works - Step 3.........................................................................................................................................338
Sender Details - Three Ways to an IDOC..............................................................................................................339
Sender Details - First Way to an IDOC..................................................................................................................340
Sender Details - Second Way to an IDOC............................................................................................................341
Sender Details - Third Way to an IDOC................................................................................................................342
Communication Methods..........................................................................................................................................343
TRFC Details 1 ...........................................................................................................................................................344
TRFC Details 2 ...........................................................................................................................................................345
TRFC Communication Error Handling..................................................................................................................346
Communication Details - Sender FTP....................................................................................................................347
Communication Details - Receiver FTP ................................................................................................................348
R/3 Communications to Ext. Programs ..................................................................................................................349
R/3 Communications.................................................................................................................................................350
Receiver Details - Unwrapping an IDOC ..............................................................................................................351
IDOC Processing Options.........................................................................................................................................352
Sender Details .............................................................................................................................................................353
IDOC Processing Options.........................................................................................................................................354
Update Details ............................................................................................................................................................356
Basic Functions used by ALE 1...............................................................................................................................357
ARFC: usage of RFC groups...................................................................................................................................358
ARFC: Resource determination...............................................................................................................................359
Basic Functions used by ALE 2...............................................................................................................................360
Structure of an IDOC.................................................................................................................................................361
Customizing ................................................................................................................................................................362
Batch Administration.................................................................................................................................................363
Administration............................................................................................................................................................364
Analysis Tools and Optimization Methods................................................................................................................365
IDOC Lists Overview................................................................................................................................................366
Time Distribution of IDOC Creation......................................................................................................................367
IDOC Trace.................................................................................................................................................................368
TRFC Monitor............................................................................................................................................................369
Monitoring Transactions...........................................................................................................................................370
Job List of ALE User on Sender Side.....................................................................................................................371
Dialog Work is Disturbed at Receiver....................................................................................................................372
Outbound Processing Options..................................................................................................................................373
Inbound Processing Options (1) ..............................................................................................................................374
Inbound Processing Options (2) ..............................................................................................................................375
RFC Customization....................................................................................................................................................376
The 10 Golden ALE Rules (1).................................................................................................................................377
The 10 Golden ALE Rules (2).................................................................................................................................378
The 10 Golden ALE Rules (3).................................................................................................................................379
Analysis Flow Chart.......................................................................................................................................................380
Possible Performance Problems ..............................................................................................................................381
Analysis and Tuning Flowchart (1).........................................................................................................................382
Application Data Does not Arrive (Subchart 1)....................................................................................................383
Application Data Does not Arrive (Subchart 1.1) ................................................................................................384
Application Data Does not Arrive (Subchart 1.2) ................................................................................................385
Application Data Arrive too Late (Subchart 2).....................................................................................................386
Application Data Arrive too Late (Subchart 2.1) .................................................................................................387
Application Data Arrive too Late (Subchart 2.2) .................................................................................................388
9. Application Data Arrive too Late (Subchart 2.3) .................................................................................................389
Application Data Arrive too Slow (Subchart 3)....................................................................................................390
Dialog Work is Disturbed (Subchart 4)..................................................................................................................391
Dialog Work is Disturbed at Sender (Subchart 4.1).............................................................................................392
Dialog Work is Disturbed at Receiver (Subchart 4.2).........................................................................................393
Exercises - Technical Optimization of ALE Processing..........................................................................................394
Solutions - Technical Optimization for ALE Processing........................................................................................396