Sei sulla pagina 1di 12

1/30/2017 SAP R/3 Performance Monitoring and Tuning

  Site Map   

 SAP R/3 Performance Monitoring & Tuning About this site   

  Here is a condensed (without the sales hype) analysis of how to make SAP R/3 systems
  performant. Included are tips on how to analyze, measure, and tune SAP for performance.   Search
   Web    WilsonMar.com
follow me  valid: 
on Twitter SAP Solution Applications, Modules, Exams 
SAP Certification Exams and Training 
SAP Installation  * SAP's Glossary, 
SAP R/3 Configuration  * help.sap.com 
SAP Netweaver Architecture Internals  * SAP Developer Network
SAP R/3 Tablespaces 
SAP Solution Manager 
SAP R/3 User and Server Administration 
SAP R/3 Monitoring and Performance Tuning 
SAP GUI Emulation for Load Testing 
SAP R/3 ABAP Programming 
SAP Enterprise Portal
 R/3 Server Architecture Overview    
 
SAP R/3 application modules run on application servers which obtain persistent
data from a database. SAP offers a Workload Analysis
training course to teach performance
Each SAP application server hosts one or more R/3 instances, each with its and tuning.
own dispatcher queue management process administering a set of R/3 work
processes (WP's). Interface BAPIs (Business Application
Program Interfaces), BADIS, RFCs
Each WP consists of an ABAP language interpreter/processor, a task handler, and (remote function calls) or RPCs
database connections. (remote procedure calls), etc. defined
at the SAP Interface Repository
ABAP (Advanced Business Application Programming) is SAP's custom http://ifr.sap.com
programming language reference dynpros (dynamic programs) stored in the
object repository.

 
 SAP Transaction Time Standards  

Part of the development process (before you check in code), run SAP
Transaction SAID (Single Transaction).

Metric Standard
Wait Time LT 10% of response time

Roll Wait Time LT 200 mx

Roll­In Time LT 20 ms

 Internally, SAP provides a "Bandwidth Test" web service page for
clients to determine the speed of the network connecting them to SAP
servers:

Philadelphia
Walldorf
Singapore

 Enough ABAP Work Processes?  

 ABAP servers have a fixed number of work processes.

So make sure that there are enough "unoccupied" work processes (CPU utilization of near zero) on a particular machine by using
Transaction SM50 (Process Overview). Click on the CPU column heading to sort by CPU utilization.

To monitor work processes on the whole landscape, use transaction SM66 (Global Work Process Overview). By default,
abbreviated information is shown (based on ADM special C calls). In Settings unselect "Display only abbreviated information" so
that RFC is scheduled to collect detailed data.

 
 SAP Performance Tuning Strategies  

Tuning efforts on SAP systems include:

1. Ensure that performance issues are addressed and tools are available at
each  project phase.
2. Use  industry­standard benchmarks to guage performance expectations
from hardware and   SAP applications.
3.   End­User Terminal /PC   browser MTU settings and administration
(defragmentation, virus/spyware checker, etc.).
4. Use 64­bit motherboards,  OS kernel, and application software (especially
for systems using over 2GB of main memory)
5. Set Operating system parameters for efficient   Windows Page File
Location and Size, plus other parameters.
6. Set   Java VM Parameters

http://www.wilsonmar.com/sap_perf.htm 1/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
7. Spread load out across several   server machines to accomodate higher
throughput and for more reliable redundancy.
8. On each server, balance   disk usage (I/O) by workload across physical
hard disks available.
9. Balance   SAP database Tablespaces based on   disk monitoring.
10.   Configure the R/3 Basis System   Server Services with the most
appropriate   database connection buffers, R/3 buffers, number of work
processes, etc..
11. Database tuning consists of these tasks:
1.   Optimize (Oracle) database configuration settings, such the size of
database buffers.
2.   Measure the cost of individual SQL requests so that "expensive"
SQL statements which take an excessively long time are identified
and optimized.
3. Reducing the number of requests for the most frequently requested
data (identified during workload analysis) and resolved by tuning how
coding stores data for reuse.
4. Create, change, or delete secondary indexes.

 
 Performance Management at Each Phase of Implementation  

Among SAP's Business Blueprint library offerings downloaded from SAP Software SAP R/3 Implementation with
Distribution Center on the SAP Service Marketplace (for free with S­User ID) ASAP: The Official SAP Guide
include a reference system as an implementation starting point in the Baseline (Hardcover) (Sybex Inc., 1998)
Package. by Dr. Hartwig Brand of SAP's
TCC (Technical Core Competence)
SAP's AcceleratedSAP (ASAP) project documentation service documents SAP Group.
System design project decisions, issue resolution, and configuration changes.
SAP Planning: Best Practices in
Each ASAP Roadmap prescribes activities which group specific tasks producing Implementation (Paperback)
deliverables. (Sams; Pap/Cdr edition (May 19,
2003) by George W. Anderson
Before SAP Solution Manager , AcceleratedSAP 4.0 contained 350 "accelerators"
such as predefined templates and forms for use while performing implementation  
as well as examples, how­to documents, and descriptive texts such as white
papers. Implementing SAP With an
Asap Methodology Focus
The R/3 Structure Modeler graphically presents the R/3 System (Paperback) (Writers Club Press,
organizational structures of an enterprise using the Structure Modeler July 2002) by Arshad H. Khan
Visio� template.
The R/3 Interface Adviser provides a central pool of information to  
design and implement permanent interfaces between SAP R/3 Configuring SAP R/3 FI/CO:
components and non­SAP systems. The Essential Resource for
The Report Navigator provides a directory of 2,000+ standard R/3 Configuring the Financial and
operational reports to pull and analyze critical transactional Controlling Modules (Hardcover)
information. (Sybex; 1st edition, April 15,
2000) by Quentin Hurst and David
Each roadmap organizes tasks within activities within work packages within 5 Nowak
phases:
 Slide show
1. The Project Preparation phase uses SAP's Question and Answer
Database (Q&Adb) while the project team is identified and  SAP ABAP Performance Tuning Tips &
mobilized, project standards are defined, and project work Tricks Introduction among SAP Tutorials at
environments are set up. thespot4sap

Those concerned with performance testing would be identifying stakeholders
in security and administration to ensure that

the correct number and size of machines are obtained match
the scope of the testing desired (this is determined from a
capacity analysis)
enough permissions are granted to those performing the work
(this is the single greatest cause of delay)
the appropriate versions of software and utilities are available
(to avoid incompatibilities)

2. The Business Blueprint phase creates Business Process
Procedures (BPP) based on SAP's Business Process Master List
(BPML) of over 1,300 business processes operating within SAP's R/3
Reference Model.

Those concerned with performance testing would be identifying application
components and utilities.

3. The Realization phase creates End User Procedures (EUP) for
transaction contexts and configuration guidance in the
Implementation Guide (IMG). Unit testing is completed, and data
mappings and data requirements for migration are defined;

Those concerned with performance testing would be creating scripts and the
framework which make debugging and running scripts efficient.

4. The Final Preparation phase includes integration and conversion
testing, performance testing and tuning, and user training.

http://www.wilsonmar.com/sap_perf.htm 2/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
Those concerned with performance testing would be running performance
tests.

5. The GoLive(TM) & Support phase migrates data from the legacy
systems, and activates the new system with post­implementation
review and support.

Those concerned with performance testing would be monitoring metrics
collected from production.

The Project Estimator generates project plans during the sales phase that precede
all this.

SAP's R/3 Info Database (InfoDB) tracks skill levels.

 Major Physical Component Servers  

The components for technical tuning are the operating system, the database, the R/3 work processes, R/3 buffers, memory
management, and the network, laid out here for each component server of a full SAP system:

Client SAP Web AS Message Enqueue Database Authentication Reporting


SAPGUI/Browser (WAS) server  server  server  server  server 
* Configuration * Configuration * JMS * * * Configuration *
* ABAP coding Configuration Configuration Configuration Configuration
* Java coding * File
# Dialog Distribution
processes * Replication
# thread pools Oracle
Connectors from Connectors Connectors Connectors Connectors Connectors from Connectors
Client from from from from Authentication from
SAPGUI/Browser SAP Web AS Messaging Enqueue Database server Reporting
server server server server server
JVM in JVM in JVM in JVM in JVM in JVM in JVM in
Client SAP Web AS Messaging Enqueue Database Authentication Reporting
SAPGUI/Browser server server server server server server
OS in OS in OS in OS in OS in OS in OS in
Client SAP Web AS Messaging Enqueue Database Authentication Reporting
SAPGUI/Browser server server server server server server
Machine hardware: Memory, Hard Disk, etc.
Network: Hubs, Routers, Proxy, Load Balancer, Firewall, DNS, Gateways, Bridges, Backbone

Performance problems in large R/3 installations with more than 10 application servers are most often caused by bottlenecks in
the database server.

Several application servers may belong to a single SAP System (identified by a SID).

   
 SAP Clients and End­User Terminals  

SAPGUI.exe for Windows is the most commonly used client.  Experts with SAP's "Remote Support"
saplogon.exe generates a parameter string for the system selected for logon. service log onto systems to resolve
problems.
SAPGUI for Java — a platform­independent implementation — uses the DIAG
protocol.  The multiclient concept of R/3" on
SAPnet.
[_] Set protocol.ora file parameter  tcp.nodelay=yes so that packets are streamed
onto the network without delay.

[_] Reduce memory usage during login by disabling images. Use transaction
SM30 and select table SSM_CUST to create a new entry named
HIDE_START_IMAGE. Set its value to YES.

One way to identify how many users are using the system is to configure and
activate SAP Audit Profiles with Tx SM19, then use Tx SM20 to review the mass
of data it outputs.

   
 Server Machines  

Each set of servers to run SAP contains several machines: Download from SAP�s Developer
Network site.
1. a firewall / network load balancer device that allocates traffic
to web servers. Having the device also handle SSL translation SAP Netweaver Forums
would alliviate 15% of web server load.
SAP Netweaver Performance Forum
2. an enqueue server or load balancer device to
3. a SAP Web AS central instance application server OLTP and BW SAP Forum: Documentation &
processing are on separate clusters. Guidelines
4. a SAP Web AS dialog application server that load balances where
users log onto. This processes user requests and handles the ASUG (American SAP User Group)
business logic.
 OraTips published by Andy Klee of
5. a SAP ECC server.
Klee Associates, Inc.
6. a SAP Enterprise Portal with UME.

http://www.wilsonmar.com/sap_perf.htm 3/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
7. a messaging server (processing JMS or MS Exchange). Spam Sams Teach Yourself
filter devices may sit between email servers and the public SAP in 24 Hours (Sams; 2
internet. edition, November 7,
8. a back­end database server (Oracle, MS SQL, IBM DB2, SAP DB, 2005) by George
etc.). More demanding environments install dedicated high­speed Anderson and Danielle
NICs and cables between the database and app servers. Signorile Larocca
9. a SAN or NAS server to store data. Mastering Enterprise SOA with SAP
10. a dedicated print server, since print queues and printing can NetWeaver and mySAP ERP (John
consume much memory and bandwidth. The same physical printer Wiley & Sons � 2007, 599 pages) by
can be defined with different logical names to different host Scott Campbell and Vamsi Mohun
spoolers so that load can be distributed among more printers as
needed. SAP NetWeaver For
11. a system monitoring server to be a sink for JMX, SNMP, and Dummies (John Wiley &
other logging and monitoring data. Larger installations would have Sons � 2004, 414
separate servers to receive data and servers to analyze and Hardcopy pages) by Dan
present the data. Woods and Jeffrey Word
12. For EDI, a CUA server to ALE child system servers.  
13. For analytics:
a Business Warehouse database, SAP Enterprise Portal: Technology
ETL, and Programming (SAP PRESS, April
reporting servers to analyze data. 30, 2005, Hardcover) by Arnd Goebel,
14. Load controllers and generators Dirk Ritthaler

All hard disk drives would be mirrored.  

There is a set of these servers for each environment (dev, integration, SCM, SAP R/3 Handbook,
functional test, performance test, staging, production, etc.). Third Edition (McGraw­
Hill/Osborne, 2006, 624
Java and ABAB each go into their separate application, messaging, and enque pages) by Jose Antonio
servers. Hernandez, Jim Keogh and
Franklin Martinez
In 1998 SAP AG announced a four­tiered client/server architecture that uses an
expanded database memory cache SAP calls liveCache that insulates the  
database from SAP applications and allows for real­time manipulation of
database objects in memory. SAP R/3 Implementation Guide
(McGraw­Hill � 1999 (509 pages) by
Connectors J.A. Hernandez, E.R. Bueno, S.A
Connectors include sockets to the database, which may be pooled within Servera and J.R.S. Elechiguerra
a Hibernate layer.
 
 SAP Transactions Testing
In the SAP world, a transaction is an operation that lets a user make SAP
changes to a database. Solutions
(SAP Press,
Each transaction is a sequence of related dialog steps controlled by a dynpro
Hardcover,
(dynamic program) presenting fields in screens. Its processing logic consists of
2007) by Markus Helfen
the PBO (process before output) to screen and PAI (Process After Input) by user.
and Hans Martin
The SAP dispatcher transaction monitor sequences those steps. Trauthwein, both of SAP Test
Management Consulting. Michael
Transactions operate with locking and commit as a database LUW (Logical Unit Lauer is a Senior Quality Specialist in
of Work) so that related changes either update all as a unit or none at all. the Product Technology Group at SAP
AG.
Transactions usually contain an interactive phase and an update phase.
Testing SAP R/3: A
 Load Balancing Manager's Step­by­Step
SAP can be configured automatically to balance the load on the system Guide (Wiley, April 20,
2007) by Jose Fajardo and
SAP's J2EE Engine is activated by the Icman (ICM monitor) service that Elfriede Dustin
forwards requests to the J2EE server. Configured in /sap/public/icman and
/sap/public/icf_info. and started with SAP Transaction SMICM, "Administration  Sun and SAP
J2EE Server". In Transaction RZ11, set the rdisp/j2ee_start parameter to 1.
 ABAP Objects: ABAP Programming
Icf_info supplies the web dispatcher with information needed for load balancing. in SAP NetWeaver (SAP Press, 2007,
1024 pages) by Horst Keller and
The web application server receives both ABAP and Java requests. The web Sascha Kr�ger [publisher website]
dispatcher forwards requests to the web application server or the J2EE server.
Interactive Electronic Technical Manual
A stand­alone Message server is required for each installation. Java (IETM)
installations also require a separate enqueue server.

The stand­alone dispatcher for J2EE, dpj2ee, is activated with profile parameter
icm/dpj2ee to TRUE. It doesn't require a database, work process, or a SAP
gateway. It starts the ICM and the J2EE Engine and connects to the message
server.

   
 R/3 Databases

The evaluation version downloadable from SAP comes with SAP's own Max DB SAP Note 327494 recommends
database. settings for MS SQL Server.

Although SAP also supports Microsoft's SQL Server, IBM's DB2 Universal Database, 
 Oracle databases are used by a large majority of SAP production instances.

SAP mandates that the Oracle SID (System IDentifier) (specified in Unix and some
other operating systems as ORACLE_SID) always begin with an uppercase "SA"

http://www.wilsonmar.com/sap_perf.htm 4/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
followed by a single alphanumeric digit or a single uppercase alphabetic character
(such as "SA9" in the range SA0­SA9 or SAA­SAZ).

 R/3 On Oracle  
Reorganize Memory  
SAP encourages a buffer hit ratio of at least 95%.
Oracle SAP
[_] Dedicate a large amount of memory to the DB_BLOCK_BUFFER initialization Administration
parameter. (Sebastopol,
Calif.:O'Reilly and
Spread I/O Around Associates, 1999) by
[_] Segregate highly volatile tablespaces (such as PSAPSTABD and Donald K. Burleson is
PSAPBTABD containing main transaction tables VBAP, VBUP, and VBEP) into based on SAP R/3 4.0 and
separate dedicated tablespaces so that they can grow very large over Oracle 8i running on Unix machines.
many data files with file striping to balance the load across many disk
 
devices.
Oracle Database
[_] Create two copies of each target tablespace to allow for COPY TABLE AS
Programming Using Java
SELECT reorganization between them.
and Web Services
[_] Dedicate (partition) a separate disk controller for writing the archived redo (Amsterdam, Boston:
logs. To that mount point isolate high volumes and write activity with exclusive Elsevier, 2006) by Kaussi
control. Mensah.

Size Redo Logs
[_] Size redo logs so that they switch no more than once every 30
minutes.

[_] Set the LOG_BUFFER initialization parameter large enough to avoid redo log
space requests.

[_] Buffer tables with many read accesses but with fewer than 100 changes per
day. Display table call statistics from the initial screen, Administration > System
administration > Monitor > Performance > Setup/Buffers > Buffers > Detail
analysis menu > Call statistics. On the next screen, make a selection and choose
Enter. Sort the display according to the data records called. Position the cursor on
an entry in the column Calls (under DB activity) and choose Sort. The Changes
column indicates which tables are being changed most frequently since the system
was started.

Size Rollback Segments
[_] Rollback segments should be set large enough to avoid "snapshot too
old" messages, while containing enough extents. For example, if a 64MB
rollback segment is large enough to avoid all "snapshot too old" messages,
then allocate the rollback segment with the following code: INITIAL=16M
NEXT=16M MINEXTENTS=2

Freespace Not Needed In blocks
In its table creation data defintion language (DDL), SAP uses fixed­length
CHAR datatypes rather than VARCHAR (variable length character)
datatype. This is perhaps not all database vendors do not support it.

 Oracle provides VARCHAR so that it can store data using the actual size of the
field rather than taking up blank space defined to make sure that users don't run
out of room on a field. However, because SAP tables are NOT created with
VARCHAR datatypes SAP produces large archived redo logs. So it is not
uncommon for large SAP databases to archive many gigabytes of information
every hour.

Also for efficiency, Oracle performs I/O to/from disk in fixed­sized (e.g., 4KB)
blocks containing several rows. Oracle accomodates varying actual VARCHAR
lengths by reserving a percent of blocks free for expansion as users add more
bytes to VARCHAR fields.

As of SAP 4.0, SAP tables are defined with PCTFREE=10, which means that 10% of
every block is reserved for row expansion. With default 4K blocks, the reserved
space will equal 400 bytes (not counting block header space). So any row that has
more than 400 bytes in length is likely to encounter much additional I/0 looking
for free blocks.

Ironically, since SAP does not use VARCHAR datatypes, expansion will never occur
and the space is wasted. Furthermore, PCTFREE=10 is not large enough because
many SAP table rows are usually quite large (up to 15,775 bytes). Thus, Oracle
wastes additional I/O looking for free blocks which are usually too small anyway.
It is usually faster for Oracle to extend into new blocks than to reuse existing
blocks, which incurs I/O for Oracle to link and unlink blocks to a freelist of where
free blocks are available for use.

Therefore, the strategy for SAP is: 
[_] Set PCTFREE=1 (very low) to turn off freelist links/unlinks altogether. 
Best yet, create tables with Oracle 10g EXTENT MANAGEMENT LOCAL.

[_] Because of large rows and use of LONG RAW within SAP's tables (particularly
in the CLU tablespace) increase Oracle's default block size to the largest allowed
by the Unix operating systems (8K) would minimize row chaining when the row
length exceeds the database block size.

user­defined SAP tables begin with the letter "Z".

http://www.wilsonmar.com/sap_perf.htm 5/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
PCTUSED

Burelson [1999, pg. 130] notes that, as of SAP 4.0, SAP delivers all of its tables,
regardless of the database block size or the average row length for the table, with
PCTUSED=40. This setting means that a block must become less than 40% full
before being relinked on the table freelist. The lower the value for PCTUSED, the
less I/O the system will have at insert time, and the faster the system can run. A
block will be nearly empty before it becomes eligible to accept new rows. As a
result, many SAP tables relink blocks onto the freelists, even though there is not
enough room on the block to accept a new row.

(pg. 132) "I've seen cases where changing the table values (using
the Oracle ALTER TABLE command) has more than doubled the
throughput of transactions against a table."

[_] set PCTUSED so that newly linked blocks have enough room to accept rows.

Burelson's pctused.sql script calculates the setting for PCTFREE and PCTUSED as a
function of the number of rows to store between I/Os.

Cluster Resequence Tables
[_] When SAP table rows are resequenced in the same physical order as
the table's primary key index, adjacent rows reside on a cluster of
contiguous blocks that Oracle can retrieve together all at once. This
situation saves as much as 50% in I/O with some SAP queries.

To identify tables that will benefit from resequencing, analyze the SAP primary
key indexes (i.e., those that end in a zero) to obtain the clustering factor column
in the DBA_INDEXES data dictionary view. Just because a table has many extents
does not necessarily mean it's inefficient. Numerous benchmarks have repeatedly
demonstrated that extended tables often outperform tables that reside in a single
extent. Due to file size limitations in older Unix systems, larger SAP tables must
be allocated in two­gigabyte chunks. This means that any SAP tables that are
more than two gigabytes must have more than two extents, since Oracle does not
permit an extent to span a datafile.

Resequencing can be performed one of several ways:

CREATE TABLE AS SELECT (CTAS) SQL statement though a duplicate
tablespace on another disk (the fastest way)
CREATE TABLE vbap_sorted TABLESPACE vbap_copy 
    STORAGE (INITIAL          500M 
             NEXT             50M 
             MAXEXTENTS       UNLIMITED 
            ) 
PARALLEL (DEGREE 4) 
AS SELECT * FROM sapr3.vbap 
ORDER BY mandt, vbe1n, posnr; 

Oracle's export/import utilities
Oracle's SQL*Loader utility

Index Optimization
SAP tables are created with a primary key index (TABLENAME_0). This
means that full table index range scans are not needed. This also means
that during normal SAP processing does not take advantage of Oracle's
parallel query features which make use of SMP (Symmetric Multi­
Processors) with multiple "independent" CPUs sharing a common
communication bus.

However, SAP applications can take advantage of Oracle Parallel Server (OPS)
services, which enables several Oracle instances to read the same database. A
Distributed Lock Manager (DLM) specific to each hard disk manages access from
several CPUs and transfer data blocks between the buffer caches of each instance.
[_] To reduce pinging of data from other clusters, each table needs a freelist
group for each instance.

[_] Create large indexes with tablespaces that are twice as large as the index tree
so that the index can be rebuilt in place within the same tablespace.

ALTER INDEX index_name REBUILD 
TABLESPACE tablespace_name 
PARALLEL 20 UNRECOVERABLE 
STORAGE (INITIAL new_initial  
  NEXT new_next  
  FREELISTS new_freelist_number)   

UNRECOVERABLE avoids the overhead of writing to the redo logs, which
nearly double the speed. But these indexes need to be recreated after a
roll­forward recovery operation.

 Disk Space Utilization Monitoring  
Table statistics history shows size and fragmentation of tables.
Top n largest tables
Top n modified tables ­ most frequently changed tables.
Top n growing tables ­ the fastest growing tables.
Compare the ABAP Dictionary vs. the actual database:

http://www.wilsonmar.com/sap_perf.htm 6/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
Missing unique Indexes ­ If any unique indexes exist in the ABAP Dictionary, but not in the database,
create them in the DB. If there are any unique indexes in the database, but not in the ABAP Dictionary,
consider deleting them from the database.
Views, tables and indexes in the ABAP Dictionary and on the database. If any of these objects exist in the
ABAP Dictionary, but not in the database they must be created in the DB. If there are any objects on the
database, but not in the ABAP Dictionary, delete them from the database.
SAP Kernel ­ transaction code SICK analyses the SAP Kernel to find out whether any inconsistencies that can
result if problems exist.

   
 R/3 Instances  

 SAP Techies
 To display all instance parameters, invoke report RSPARAM.
mySAP Tool Bag for
Even though it is possible an application server to have more than one, there is
Performance Tuning and
usually only one dialog instance on an application server to run the SAP kernel
Stress Testing (prentice
(similar to an Oracle instance) which intercepts requests for work from SAP
clients and executes ABAP programs and manages requests for data and hall, 2006)   by George
services. W. Anderson [ read it
online]
Each dialog instance contains a dispatcher task and a set of R/3 work
processes (WPs).  

SAP System Operations (SAP Press,
Hardcover, 2004) by Michael
Missbach, Ralf Sosnitzka, Josef
Stelzel, Matthias Wilhelm

Basis Administration
for SAP (Premier Press �
1999, 580 pages) by
Robert E. Parkinson, Kay
Tailor, Victor Wood and
Johan Marneweck

 SAP Server Services (Central Instance) Work Processes  

Most generic SAP architecture implementations have numerous application servers, but only a single central instance that
manages SAP interfaces. A central instance is a concept unique to SAP. The central instance is a combination of hardware and
software. It contains a physical server (the application server) and numerous software components, including a message server,
a database gateway (a pre­established connection between SAP and Oracle­­or another database), and various update, enqueue,
dialog, and spool facility software.

These work processes all run in parallel:

Server Service # in Profile Description


Web AS Dispatcher ­ ­ The transaction monitor/control program that (through a request
queue) receives screens from presentation services and passes
them to work processes in a balanced way. The dispatcher
communicates with the task handler within each work process.
The task handler coordinates the loading and unloading of user
session context for each dialog step. and activates the dynpro
interpreter or the ABAP processor, as required.
Dialog DIA rdisp/wp_no_dia Used for interactive online processing. There is a minimum of 2 of
these on each server. Each dialog work process constantly
switches among sessions for different users. All work processes
reference user contexts in a common memory area.
Batch BTC rdisp/wp_no_btc Used for jobs running consecutively in the background. Each job
(Background) step is an ABAP or external program.
Update (V1) UPD rdisp/wp_no_vb Used for time­critical updates that need to happen immediately.
Update (V2) rdisp/wp_no_vb2 Used for updates that are not critical and can be delayed until
resources are available.
Spool SPO rdisp/wp_no_spo Formats print requests for passing to host spool systems. Scans
TemSe (temporal sequential objects) in the spool database for
requests lost through queue overflows. As of Release 4.0, SAP
allows more than one spool process per instance.
ABAP Enqueue ENQ rdisp/wp_no_enq The single "central lock management" mechanism that ensures
Central (lock data consistency by locking/unlocking portions of the database to
Instance manager) all application servers during exclusive update.
Message ­ ­ Communicates with the different application servers to route
Server messages (includinge licensing) between the servers. Each SAP
instance has only one message server. The location of the host
running the message server is configured in the DEFAULT.PFL
common profile parameter rdisp/mshost = <hostname>. It has its own
start execution line in the start profile.
Gateway ­ ­ Used for transport of bigger amounts of data between application

http://www.wilsonmar.com/sap_perf.htm 7/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
servers as well as external (non­SAP) systems that communicate
with SAP using the CPIC (Common Programming Interface
Communications) protocol developed by IBM and X/Open — the
lowest­level protocol used on the TCP/IP socket when connecting
through the R/3 Gateway). Displaying Active CPI­C Connections
Java Enqueue ­ ­ ­
JMS ­ ­ ­

The Global Work Process Overview displays: * The status of each application server * The reason why it is not running *
Whether it has been restarted * The CPU and request run time * The user who has logged on and the client that they logged on
to * The report that is running

[_] Indicate the number of update work processes of type V1 and V2 inside the profile parameter file for each instance by
specifying parameters rdisp/wp_no_vb and rdisp/wp_no_vb2

 R/3 Basis System Tunables
[_] The number of available work processes per application server should be configured using the SAP system  
profile parameters values appropriate to hardware capacity and the peak activity anticipated.

[_] The number of database buffers should be set for the maximum anticipated number of simultaneously active users.

Shared memory areas (buffers) holding user context data are available to all Work processes of all applications. Data there
are quicker to access than retrievals from the database. However, data may be rolled out to the hard disk if not enough memory
is available. 
[_] The sizing and configuration of these buffers (such as the refresh rate) is very important for system performance.

[_] Parameter rdisp/wpdbug_max_no specifies the maximum number of work processes that can be run simultaneously in
debugging mode.

[_] Ensure that a large enough size is specified (in bytes) for the 
SQL trace file in parameter rstr/max_diskspace. 
ABAP trace files in parameter abap/atrasizequota.

 Dispatcher Request Que Length and TimeOut
[_] Set dispatcher request que length so that there are enough to the calculated total number of requests that may  
que up (be buffered) during the time it takes for operators to recognize an overflow and the time it takes to add
more servers to handle the overflow.

The SAP instance profile parameter rdisp/max_wprun_time is the maximum allowed time for interactive execution of a dialog
step before the dispatcher stops the work process and issues a TIME_OUT error. It has a default value of 300 seconds (5
minutes).

[_] Especially during stress tests, the default client time­out value of 10 seconds needs to be increased.

 Day and Night Op (Operation) Modes  

The number and type of work processes (WPs) supported by each application server are controlled by the "op mode" running.

A "day mode" may consist of more dialog WPs for interactive sessions during the day. 
A "night mode" may consist of more batch WPs for batch processes run overnight.

Op modes are automatically switched by a SAP background job according to the timetable set by the BASIS administrator.

Additionally, different database initialization (Oracle INIT.ORA) files may be used at different times of day:

The day mode has more PGA memory allocated to support more users. 
The night mode has shift memory to support backups and other batch processing.

R/3 application server work processes are configured so that each work process handles, on average, 5 to 10 active users
(assuming that typical users need around 10 times as long to enter data in the screen and interpret the results as the R/3
System needs to process the user requests.)

Reading data from the R/3 buffer in memory is approximately 10 to 100 times faster than reading data from the database
server. Global data available to all work processes on the R/3 instance, such as programs, table field definitions, and the
contents of Customizing tables are stored temporarily in the buffer.

Op modes are established by the SAP system administrator, commonly called the BASIS administrator,

 
 Web AS Server Instance Profile Configuration

Location of Files
Path name for the ABAP trace files. abap/atrapath ­
Name of the SQL trace file. rstr/file ­

Instance profiles named <SID>_<instancename>_<hostname> are automatically generated by the R/3 setup utility when an
instance (dialog or central) is installed. By default, the name assigned to them has the format , Instance type profiles for a
particular instance can override system profiles in DEFAULT.PFL.

Although the sappad text editor can edit profiles even if the system cannot start, profile maintenance should be performed using
SAP R/3 Computer Center Management System (CCMS) transaction RZ10 (Edit Profiles).

 sappfpar CHECK pf=C:\SAP\NSP\SYS\profile\NSP_DVEMGS00_BUBBA1 
verifies the profile file.

http://www.wilsonmar.com/sap_perf.htm 8/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
Enter transaction code SMLG or menu Tools > _CCMS > Configuration > _Logon Groups to configure logon groups and their
instance servers for Load balancing. This information is used by the SAP logon Windows application on each workstation to
decide which system the user logs on to.

Changes to profile parameters take effect after a system restart. 
Using the CCMS profile maintenance tool also requires the profile to be activated.

 High­level Memory Allocation
Operating 30 ­
system MB
SAP ­ Check memory usage from initial screen Administration > System administration > Monitor >
System Performance > Setup/Buffers > Buffers > Goto > Current local data > Additional functions >
Storage. Increase SAP buffers until no more object swaps occur.
Database ­ ­
system

Connections
[_] Configure the number of users allowed to log on to an instance and the response time threshold for that
instance.

[_] Ensure there are enough connections specified with these parameters: 
Default
Connection Pool Max. Parameter
Value
front­end connections in table tm_adm. rdisp/tm_max_no ­
CPIC/RFC connections that can be administered in communication table rdisp/max_comm_ ­
comm_adm. entries
CPIC/RFC connections that can be administered by the gateway service in gw/max_conn ­
table conn_tbl.

 R/3 Shared Memory  

allocated in segments.

 R/3 SAP Buffers in Memory  
Command $TAB resets Table buffers. 
Command $SYNC resets (in up to one hour) all SAP buffers on the application server. This is issued automatically
every time new developed source is transported into a system running tp.

by
Buffer for ... Parameter for Startup Max. Entries
Priority
1. TTAB (R/3 table ­ entrycount rsdb/ntab/entrycount ­
Repository definitions) in * 100
Buffers Table DDNTT bytes
(ABAP
Dictionary FTAB (R/3 field rsdb/ntab/ftabsize KB rsdb/ntab/entrycount * 2 =
buffer) definitions) in max.
Table DDNTF
SNTAB rsdb/ntab/sntabsize KB rsdb/ntab/entrycount * 2 =
(Short/Summary max.
names derived
from DDNTT &
DDNTF
IRBD (Initial rsdb/ntab/irbdsiz KB rsdb/ntab/entrycount * 2 =
record layout max.
initialized
depending on
the field type)
2. Single Record rtbb/buffer_length KB rtbb/maximum_tables Max.
(transparent (of 100KB ­
and pooled) 200KB) of Partial
Table Tables
Buffers
Generic (client) zcsa/ table_buffer_ area ­ zcsa/database_max_buftab Max.
Key Table (for
resident/full
buffering of all
entries in a
table)
SAP Buffers 3. Program abap/buffersize KB ­ ­
Buffer PXA
(Program
Execution Area)
stores compiled
executable
versions of ABAP
programs from
http://www.wilsonmar.com/sap_perf.htm 9/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
tables D010L
(ABAP loads),
D010T (texts),
and D010Y
(symbol table).
4. Roll and PHYS_MEMSIZE ­ ­ ­
Paging Buffers
5. SAPGUI Presentation zcsa/presentation_buffer_area / 2 = sap/bufdir_entries Max.
buffers buffer storing bytes
Dynpro loads
(Screens)
CUA (menus, rsdb/cua/buffersize KB ­ buffersize
pushbutton / 2 =
definitions) from Max.
tables D345T
(CUA texts) &
D342L (CUA
loads)
Export/Import to/from rsdb/obj/buffersize KB rsdb/obj/max_objects Max.
database (available to several
work processes) using ABAP
command EXPORT TO/IMPORT FROM rsdb/obj/large_object_size = Typical size of the largest objects bytes
SHARED BUFFER.

Calendar (work days and zcsa/calendar_area KB zcsa/calendar_ids Max.


public holidays in db tables entries
TFACS and THOCS)

 Set the count of entries approriate to its size, since an increase in one may lead to a bottleneck in the other.

SAP Cursor Cache (in the shadow process owned by each WP) reduces the number of parsing of SQL statements by storing
cursors for SELECT statements to avoid time consuming PREPARE processing. The DBSL (Database SQL Library) creates and
maintains statement IDs. Its profile setting of dbs/stmt_cache_size is different for each database (default fixed size of 250), so it
should not be changed. The memory space of each entry in the statement cache is allocated dynamically, with a maximum 64KB
per entry.

 More on Roll and Paging Buffers (Extended memory)  
SAP's Zero R/3 ­
Administration Memory extended
Management introduced memory
with R/3 Release 4.0
reduces tweaking to one fixed fixed local memory for each R/3 work process
R/3 profile setting:  local
[_] PHYS_MEMSIZE to memory
specify how much of the R/3 heap variable local memory for R/3 work processes 
computer�s main memory memory abap/heap_area_total = how much R/3 heap memory can be allocated in
should be used for the R/3 sum by all work processes. 
instance. SAP dynamically abap/heap_area_dia and abap/heap_area_nondia = maximum
allocates this memory amount of R/3 heap memory that can be allocated by a dialog or nondialog
among roll, extended, heap, work process, respectively.
and paging memory, which
should not have sizing R/3 roll Only one work process can access these buffers at a time.
parameters specified in memory rdisp/ROLL_MAXFS specifies the size of the total global roll area (R/3 roll
profiles. buffer plus the roll file). 
rdisp/ROLL_SHM specifies the size of the R/3 roll buffer. 
ztta/roll_area specifies the size of the local roll area for all types of R/3
work processes.
R/3 ­
paging
memory

User session context information is moved around thus:

http://www.wilsonmar.com/sap_perf.htm 10/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning

1. When a transaction starts, user context data up to the amount specified in the parameter ztta/roll_first is
stored in the local roll area of the work process. This parameter should be set to 1 byte so that initially, no user
context data is stored in R/3 roll memory. However, the R/3 roll memory always contains a small amount of
administrative data, which requires around 100KB in the local roll area of the work process, even if ztta/roll_first
is set to 1. An example of this administrative data is the addresses or pointers used to locate the user contexts
in R/3 extended memory.
2. If the user context is larger than the value of the parameter ztta/roll_first, the data is stored in R/3 extended
memory.
3. If the R/3 extended memory area is full, or if the user context reaches the value specified in the parameter
ztta/roll_extension (the maximum amount of a single user context that can be stored in R/3 extended
memory), the next part of the user context is stored in the remaining (non­initial) part of the local roll area up
to the size specified in the parameter ztta/roll_area.
4. If the continuing growth of the user context exceeds the amount of local roll area allocated to it by the
parameter ztta/roll_area, the work process uses R/3 heap memory. R/3 heap memory has the disadvantage
that it is local and — unlike R/3 roll memory — is not copied to a global memory area. If a work process
allocates R/3 heap memory, the user context cannot be transferred to another work process. The work process
remains exclusively assigned to a particular user in what is known as private ("PRIV") mode.

In the Work Process Overview (Transaction SM50 or SM66), private mode usage is indicated in the columns Status and
Reason by the values waiting and PRIV respectively.

5. If the data volume for one work process reaches the value specified in the parameter abap/heap_area_dia,
or the total data volume for all work processes reaches the value of abap/heap_area_total, the respective
program terminates.

If ztta/max_memreq_MB is set too low, message SYSTEM_NO_ROLL will be issued.

   
 Benchmark Applications  

Settings to avoid distorting measurements:  Performance Benchmark suites

1. Stop SAP internal processes and activities that never run in
customer systems. Run the system in customer mode by setting
the transport_system_type profile parameter to "Customer".

2. Disable batch processing (if batch jobs are not part of the scenario
being measured). In transaction RZ03 set the dynamic operation
mode.

3. Backups should not be running.

4. Deactivate ABAP Debugging.
In transaction SE80 > Utilities(M) > Settings pop­up > Debugging
is deactivated. Ensure that the setting "Session breakpoint active
immediately" in the ABAP Debugger

     
 Solution Manager Monitoring

The SAP Solution Manager  framework for monitoring and implementing SAP  SAP Solution Manager product


systems. home page
During the configuration and management of the system landscape, SAP SAP Solution Manager
Solution Manager can execute ABAP scenarios executable configuration (IMG) (SAP Press, February 12,
files. 2007) by Matthias Melich

LoadRunner and Performance Center includes several SAP tools for working with LoadRunner obtains
the SAPGUI protocol. statistics from CCMS
through (after additional HP licensing)
port 8888 on a HP SiteScope server

http://www.wilsonmar.com/sap_perf.htm 11/12
1/30/2017 SAP R/3 Performance Monitoring and Tuning
SAPGUI Spy examines the hierarchy of GUI Scripting objects on with SAP Java Connector (JCO)
open windows of SAPGUI Client for Windows. To install the SAPGUI installed.
Spy component, copy the three files mscomctl.ocx, Msflxgrd.ocx,
and msvbvm60.dll from the SAP_Tools\SapGuiSpy\System32VBdlls
directory to your C:\WINNT\system32 directory, then register the
files. To register each file, select Run from the Windows Start menu
and type: regsvr32 . Run SapSpy.exe from the SAP_Tools directory.

SAPGUI Verify Scripting verifies whether the SAPGUI Scripting API is
enabled. To install the Verify Scripting component, run VerifyScripting.exe
from the SAP_Tools directory.

Verify RFC User determines whether a SAP user specified to connect to
the SAP system has permissions to invoke the required RFC functions
necessary for working with SAP Diagnostics. To install this component,
copy RFCFunctionsCollection.dll from the Verify RFC User directory to your
local hard drive. Then register the file by selecting Run from the Windows
Start menu and typing:

 regsvr32 RFCFunctionsCollection.dll

In the Verify RFC User directory, load AddMTSDestinationsFolder.reg by
double­clicking the file and acknowledging the risks.

Then run VerifyRFCUser.exe.

add Add
      to                                                             to      
Windows Technorati
Portions ©Copyright 1996­2010 Wilson Mar. All rights reserved. | Privacy Policy | Last updated | HTMLHELP | CSS | Cynthia 508 |

Related Topics:
 LoadRunner 
 SNMP 
 Rational Robot 
 Free Training! 
 Tech Support 

  Top of Page 
Your rating of this page: 
Your first name:
Low           High    

Your comments on this topic, please: Your family name:
   
Your location (city, country):
Thank you!
   
Your Email address: 
__@__.__  

 Email me updates 
 
 Publish this comment publicly Send

http://www.wilsonmar.com/sap_perf.htm 12/12

Potrebbero piacerti anche