Professional Documents
Culture Documents
Topics
General remarks Configuration of SAP instance Memory Configuration of the Web Application Server (ST02) Important SAP Buffers and Settings ICM and ICF: Configuration of WebServices Load Balancing Operation System and Hardware Database DB All platforms DB Oracle Basics of Memory Management CBO Statistics Tablespace Management Analysis Roadmaps
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 2
Network
Wait time
Roll in
Load time
Processing time
Network
Database time
Response time
Presentation Server
Application Server
Database Server
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 3
Response time in milliseconds: Starts when a user request enters the dispatcher queue; ends when the next screen is returned to the user. The response time does not include the time to transfer from the screen to the front end. Wait time in milliseconds: This is the time a user request sits in the dispatcher queue. It starts when user request is entered in the dispatcher queue; and ends when the request starts being processed. Roll-in time in milliseconds: The amount of time needed to roll user context information into the work process. Load time in milliseconds: The time needed to load from the database and generate objects like ABAP source code, CUA, and screen information. Processing time: This is equivalent to response time minus the sum of wait time, database request time, load time, roll time, and enqueue time. Database request time: Starts when a database request is put through to the database interface; ends when the database interface has delivered the result. CPU time in milliseconds: This is the CPU time used by the R/3 work process
Large load time Large database request times (Cont.) (Average) Large CPU times
Yes
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 4
If a problem is detected, the data in the Workload Monitor (Transaction ST03N) can be used as follows to identify the area of the system where the problem is located. First check for general performance problems affecting all transactions. Good general performance is normally indicated by:
Wait time < 10% response time Main menu (choose Transaction Profile) < 100 ms
In the Workload Monitor, the following values normally indicate good performance:
Average roll-in time Average roll out time Average load (and generation) time Average database request time Average CPU time Average CPU time < 20 ms < 20 ms < 10 % of response time (<50 ms) depending on the process depending on the process Not much less than processing time
Problems with SAP memory management, CPU bottleneck SAP buffer too small CPU/memory bottleneck on database server, network problems, expensive SQL statements, database locks, missing indexes, missing statistics Expensive ABAP processing, for example, processing large tables, frequent accessing of SAP buffers CPU bottlenecks, network problems, communication problems
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 5
Topics
General remarks Configuration of SAP instance Memory Configuration of the Web Application Server (ST02) Important SAP Buffers and Settings ICM and ICF: Configuration of WebServices Load Balancing Operation System and Hardware Database DB All platforms DB Oracle Basics of Memory Management CBO Statistics Tablespace Management Analysis Roadmaps
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 6
Server
Virtual memory
Shared memory
Roll buffer SAP Paging buffer SAP buffers (programs, tables) Extended memory (user contexts)
Local memory
Heap memory (temporary)
Local memory
Local memory
...
Local memory
1:n
SAP roll file SAP paging file Work process Work process
1:1 ...
Work process
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 7
Virtual memory Virtual memory = sum of shared and local memory which is configured for the instance The operating system determines itself, if the allocated memory area resides in the physical memory or in the operating system swap space. Memory areas SAP memory areas are located in one or more of the following: Local memory Shared memory File system Local memory: is associated with individual work processes. Is for: Executables, data stack, buffer for datadabes transfer, local roll area, local paging area Extendend Memory (EM) Contains user context that is, user objects associated with individual users, such as variables, lists and internal tables Most important area for processing data. Swapping should never happen!!. With swapping the performance goes absolutely down. Recommendation: Max use of EM < 80 % of EM in memory SAP buffer: Contain global objects for all users and workprocesses such as programs and customizing tables Usually the program buffer is the largest object (less swapping allowed)
Restrictions
Not more than 60-100 workprocesses (64-bit operating system) should be configured for one SAP instance (due to administration overload on dispatcher and semaphore lock situations)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 8
Example: Old settings in your system rdisp/wp_no_dia = 10 rdisp/wp_no_btc = 15 rdisp/wp_no_vb = 4 rdisp/wp_no_vb2 = 2 rdisp/wp_no_enq = 1 rdisp/wp_no_spo = 1 BW doesnt need any wp_no_vb2 at all and it is enough to have only one wp_no_vb. Provide enough work processes (wp_no_dia) if you want to load Data in paralell from ODS Layer in the Cubes. Sometimes it is useful to configure operation mode load with more than 8-10 BTC processes and operation mode reporting with just a few BTC processes (e.g. 4). Theoretically: there is no restriction to 100 for the number of workprocesses per instance, but due to adminstrative overhead, it makes no sense to configure more than 100 WP/Instance (see note: 9942). In BW additionally semaphore lock wait situations can occur, if more than 60 workprocesses are configured. If a work process is blocking a ressource, he sets a semaphore. Another workprocess which wants to access this ressource too has to wait. 8 New settings in your system (recommended) => 16 => 8 => 1 => 0
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 9
The status of the buffers can be checked using transaction ST02. Table buffers are used to implement a caching mechanism for data read from the database. The caching mechanism has to be enabled for individual tables. In general, there should be no swaps on any of the buffers, except for the program buffer, for which even very large buffers swaps will occur. Swaps for nametab buffers, CUA, screen, and calendar buffers should always be avoided by increasing the size of the buffer, or the number of directory entries (whichever caused the swaps). If the generic key or single record buffers are swapping due to a lag of directory entries the number of entries should be increased or you can check whether some generically-buffered tables have generic regions that are too small. If the generic key or single record buffers are swapping due to a bottleneck in available memory, check whether enough shared memory is available to increase the buffer size or whether buffering should be disallowed for some tables that are consuming too much space inside the buffer. For the export/import buffer, a few swaps can be tolerated if otherwise the buffer would increase to more than 100 MB. In contrast to the export/import buffer, the export/import SHM buffer has no inherent replacement. Whenever a select is done for a table with caching enabled, the data is first looked for in the buffer and only when it is not there, it is read from the database. The first access to a table puts the information of this table into the buffer. The number of invalidations and the size of the buffer represent costs associated with buffering. The number of database accesses gives a feeling for the savings. The buffer settings and the access pattern for the larger tables in the buffer have to be checked carefully, especially in the case of memory problems in the generic key buffer. Are there any invalidations for the large tables? (Invalidations are more expensive if a larger buffer area is invalidated. As invalidations are very expensive in general, it is also a good idea to sort the display by number of invalidations and see what is causing them). To check the number of directory entries used per table, double-click a table and look at Generic Regions. If problems are identified here that cannot be fixed by changing the parameters of the buffer, check the technical settings for the tables and/or the statements accessing the table. In addition to the information that can be obtained from transaction ST02, you can use the RSDBBUFF report to check the buffers.
10
Total size for SAP instance which will be allocated after startup of SAP instance
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 11
The size of virtual memory allocated is the amount of memory, the SAP instance allocates during the startup.
11
Parameter
Size of buffer rtbb/buffer_length: 200000 kB (Up to SAP Basis Release 4.6D the maximum size limit is 200 MB see note 480710 for details) Max. number of buffered tables rtbb/max_tables: 500
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 12
To access a table in single record buffer, the statement must contain the select single command in ABAP. The handling of the single record buffer in combination with BW SID tables is more expensive compared to BW 2.x For changing the buffering settings globally for BW tables see SAPNote 550784. Is espacially recommended for large tables in which only a few records are accessed. Since 6.10 the maximum size for table bufer and single record buffer is 4 GB. Individual records of tables with single-record buffering are managed in the single-record table buffer TABLP. Technical Implementation and Buffer Access The single-record table buffer contains a central administrative structure, a table directory and the data area. The data area is organized in frames of a fixed size (default value 4 KB). The table names are sorted alphabetically in the directory. The table entries are also stored sorted in the corresponding frames of the data area. In a buffer access, a binary search is first used to find the entry in the table directory, followed by the corresponding frame and then the record searched for within the frame. Frames can overflow in the data area if new data is inserted while adhering to the sort sequence. Such overflow frames have to be divided up and their administrative structure must be updated. This explains why the single-record table buffer is somewhat less efficient than the generic/full table buffer. In the single-record table buffer, the data records must be added one after the other while reorganizing the frame structure. In the generic/full buffer, however, all the data of a table is transferred in one step, already sorted by the database.
12
Parameter
Size of buffer zcsa/table_buffer_area: 200.000.000 Byte Max. number of buffered objects zcsa/db_max_buftab: 5000
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 13
Entries in a table buffer are always sorted by primary key Generic buffering is recommended for the following tables Client-dependent Language-dependent (in general, only records of one language will be needed) Full buffering is recommended for the following tables: Tables up to 30KB in size. If a table is accessed frequently, but all accesses are read accesses, this value can be exceeded. Pay attention to the buffer utilization factor. Larger tables where large numbers of records are frequently accessed. Tables where frequent attempts are made to access data not contained in the table. Generic table areas or full tables are managed in the generic/full table buffer TABL. The individual generic areas are managed in the buffer like autonomous, fully buffered tables. Technical Implementation and Buffer Access Like the single-record buffer, the generic/full table buffer has a central administration structure, a table directory and the data area. The main difference between the generic/full buffer and the single-record buffer lies in the data area administration. The generic/full buffer divides its storage into areas (extents) of variable length. The length of an extent is a multiple of a fixed block size (256 bytes). The buffer management tries to place the contents of a generic table area or a whole table in an extent. This reduces the storage requirements for buffered data in comparison to single-record buffering. The table names are sorted alphabetically in the table directory. The data records are transferred to the corresponding extent in one step, already sorted by the database. In a buffer access, there is first a binary search for the corresponding table name in the table directory. Then there is a binary search for the corresponding data record in the extent. 13
Export/Import Buffer
Buffered Objects
Metadata of InfoCube Query definition Hierarchy definition Intermediate results when using MultiProvider in Parallel mode
Parameter
Size of buffer rsdb/obj/buffersize: 100000 kB Max. number of objects in the buffer rsdb/obj/max_objects: 15000 Estimation for the size of the largest object rsdb/obj/large_object_size: 8192 Byte
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 14
The entries in the buffer can be read as follows: RSIX: 500: RS: used by the OLAP processor client query definition of OLAP
The next 25 digits are the GENUNIID of the query The last 5 digits (R5100) are interesting for development Example 500RS3M68URSQE6LEVH7T6XSQ42Q2GR5100 The Genuniid can be converted using the function module CONVERSION_EXIT_GENID_OUTPUT.
The profile parameters 'large_object_size' determines which influence the larger objects in the buffer have. The unit is Bytes. The size of this parameter determines the size of the freespace list and has influence on the overall performance. If a lot of objects are larger than 8 kBytes, this parameter should be adjusted. Converning the maximum size of the buffer there is a limit of 32 GB. See SAPNote 156957 for details how to calculate the size of Exp/Imp Buffer
14
Parameter
Size rsdb/esm/buffersize_kB: 4096 kB too small for BW installations Recommended: 200-300 MB Max. number of objects in the buffer rsdb/esm/max_objects: 2000 Recommended: 10.000 Estimation for the size of the largest object rsdb/esm/large_object_size: 8192 Byte
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 15
With BW2.0B only local query cache was available. Objects, which were buffered in local query cache are only available for the same user again. Usage of objects from local query cache is user-dependent. With BW3.0B additionally to the local cache a global query cache is available. Objects in the global cache are available for each user. Usage of objects from global cache is user-independent. By default the Import/Export SHM Buffer is too small for BW, if the globale query cache is used For optimal query performance when using huge hierarchies (e.g. PSP (project structure plan) elements) rsdb/esm/buffersize_kb has to increased by factor 10 20. The exp./imp. SHM buffer has no inherent replacemant. Is used by the ABAP keyword export to / import from shared memory
15
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 16
Directory: /usr/sap/<SID>/SYS/profile
DEFAULT.PFL INSTANCE.PFL default profile overwrites the basic parameters stored in the coding overwrites the basic parameters stored in the coding and in the
16
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 17
Online queries allocate dialog workprocesses, webqueries additionally ICM threads. Default value for max_wprun_time are 600s. Usually too small for BW! rdisp/keepalive: Specifies the maximum time (in seconds) after which the dispatcher uses a ping to check a SAP GUI connection on which no data has been transferred since this time. If the SAP GUI does not respond within the time specified by %%rdisp/keepalive_timeout%%, the dispatcher terminates the connection.
17
SAP Web AS
DIAG Dispatcher Workprocess Workprocess Workprocess Workprocess
HTTP HTTP(S) HTTPs ICMan intern J2EE Engine File I/O CGI
DB
New terms:
ICMAN = Internet Communication Manager ICF = Internet Communication Framework
In the past usually communication took place via SAP-specific DIAG port. Since WebAS 6.10 there is also a HTTP, HTTPS or SMTP port availaible Full SAP Application Server (not just a gateway) with ABAP runtime, Database, DDIC, Security... Runtime and Development Environment for page based Web programming model (Business Server Pages) HTTP Server and Client functionality Native support for open protocols; HTTPS, SSL, SSO, Server and Client Certificates (X.509) XML/XSLT engine, integrated J2EE Engine Datatransfer between ICMAN (threads) and SAP workprocesses with memory pipes (very fast!)
18
Profile Parameters
See Reference guide for details (icm/*) Online Help
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 19
ICMAN.EXE starts the ICM (usually automatically via startsap). There is just one process running on OS level, because of multi threaded architecture. Similiar to disp+work.exe you have to patch periodically icman.exe in order to fix bugs and to get new functionality SMICM
Similiar to Workprocess monitor Status information, traces, logfiles, services, ...threads Temporary configuration of additional services possible
SICF:
Activatation, modification or creation of services Switch on http compression
19
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 20
20
Services in SICF
Activation:
Activation of ICF-services after the installation necessary in order to work with the ICM (e.g for webreproting). Due to security aspects only activiation of really necessary services is recommended. After installation all ICF services are inactive per default.
right
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 21
For Web Reporting only activation of the subtree BW including all subnodes is necessary. Deactivation and activation during runtime of the SAP instance is possible.
21
ICF: Services
Transaction SICF:
services define URL for HTTP handlers Default user settings for public sites Default client, language Definition of Aliases Individual ICF Services for BSP and HTTP Applications BW services delivered as standard
Attend to SAP Note 550669
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 22
Due to security aspects activate only really necessary services. SAP kernel 6.20 Patchlevel: 251 ( SAPNote 542576). http compression works for all plattforms
After applying http compression you have to invalidate the http server cache ( SAPNote 550669). SAP kernel 6.20 Patchlevel: 850 ( SAPNote 629124). automatic session handling is improved
22
Service Data Handler List Error Pages Anonymous Logon Data Logon Data Required Client User Password still initial Language Security Requirements Standard SSL Client Certificate w. SSL Basic Authentification Standard R/3 User Internet Users Service Options Server Group: SAP Authorization ErrorType 0 Session Timeout 00:00:00 (HH:MM:SS) Compression (if possible)
Server group: selection for load balancing. SAP Authorization: Check for value in users S_ICF authorizations and the message type to send Session timeout: timeout for user session otherwise profile parameter rdisp/plugin_auto_logout is used Compression: gzip compression option
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 23
23
Load Balancing
Concepts
Provides the capability to distribute processing across several servers optimally utilize the server resources that are available. Avoid inefficient situations where one server is overloaded while other servers go underutilized. The following processes can be balanced: Logon load balancing: workload of query/administration users Distribution of web users can be configured in SICF. ODS Object Data Activation is definable for specific server groups Process Chains can be processed on specified server groups Extraction from the mySAP source system: RFC destination (SM59). Data staging via XML over HTTP/SOAP can be processed on specified server groups.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 24
For information on load balancing for web applications, see SAPNote 493475 (BW Web Intelligence and using the message server) and SAPNote 561885 (BW Web Intelligence and SAP BW Web Dispatcher/Reverse).
24
WORKLOAD DISTRIBUTION
STATIC
Start parallel processes manually Start a report that starts processes with fixed packages
DYNAMIC
using logon groups using RFC server groups
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 25
25
WP 1
17 19 18 13 9 5 14 15 10 6 1 16 11 7 2 12 8 3 4
time waiting active T1
WP 2
WP 3
WP 4
WP 5
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 26
26
WP 1
5 4 3 2
7 9 6 8 1
10 11 12 13 15
18 19
WP 2
WP 3
17 16 14
time
WP 4
WP 5
waiting
active
T1 (now)
T1 (before)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 27
27
SMLG
RZ12
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 28
28
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 29
Problem with Logon Server Groups in BW: No rebalancing of users, once they are connected. If the user doesnt logoff by himself, this can lead to an overload of the application server. Solution: Terminate the connection automatically by setting the profile parameter rdisp/gui_auto_logout.
29
CALL FUNCTION '...' DESTINATION IN GROUP 'A STARTING NEW TASK ABC
Instance 1 Instance 2 Instance 1 Instance 2
Server Group A
Server Group B
SAP System
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 30
Synchronous RFC Call: The calling program stops until the function module has been processed on the target server and any results have been returned to the caller. Only then does the calling program continue processing. Asynchronous RFC: The calling program runs parallel to and independently of function module processing in the target system. Programmers are responsible for the processing of the results. In addition, the target system must also be available at the time of the RFC call. Transactional RFC: Several function modules can be grouped into one transaction. They are processed only once in the target system, within an LUW, and in the sequence in which they were called. In the case of an error, a message is sent to the calling system that you can analyze using transaction SM58. For transactional RFC, the target system does not have to be available at the time of the RFC call. In addition, you can configure the frequency and intervals of individual queries.
30
Server Group A
Message Server
Instance 1 Instance 2
Dispatcher Queue
1. at least 3 free dialog WPs WP 1 WP 2 WP 5 2. less than 10% ongoing requests in the wait queue NOT CONFIGURABLE !!!
Dispatcher Queue
WP 1 WP 2 WP 5
WP 3
WP 4
WP 6
WP 3
WP 4
WP 6
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 31
31
Server Group A
Message Server
Instance 1 Instance 2
1. dispatcher queue: rdisp/rfc_max_queue % 2. at least rdisp/rfc_max_ own_used_wp free dialog work processes 3. at most rdisp/rfc_max_login % of allowed logins ...
Dispatcher Queue
WP 1 WP 2 WP 5
Dispatcher Queue
WP 1 WP 2 WP 5
WP 3
WP 4
WP 6
WP 3
WP 4
WP 6
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 32
rdisp/rfc_max_queue: Quota for dispatcher request queue Quota for the maximum number of requests in the dialog queue. If this value is exceeded, no further resources are returned to the caller, as the server should be protected from overload. The value is specified as a percentage, that is, it depends on the current value set in the profile. The total number of requests in the queue is specified by the parameter %%rdisp/elem_per_queue%%.
rdisp/elem_per_queue: Number of Requests per Work Process Queue This parameter determines the number of requests which can be held in one queue (dialog, update, lock, background, spool) in the dispatcher. A request requires less than 200 bytes of storage. Most requests require an additional data block, which is drawn from the pool of blocks provided in wp_ca_blk_no. Servers that provide only dialog services (interactive users) require relatively few blocks. In servers that offer enqueue, batch, and update services, require more blocks. In general, the default value is sufficient even for the higher demands in non-dialog servers.
32
Determination of resources in RZ12 is available as from release 4.5A. Settings are valid for a single instance, not for the whole server group. Do not forget to save the settings. Assign more than one server to a server group.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 33
33
RZ12
defined per instance
percentage value
absolute value
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 34
Activated: Switch to activate or deactivate the resource determination 0 Routine for resource destermination is deactivated 1 Routine for resource determination is activated Profile parameter : rdisp/rfc_use_quotas Default value : 1
34
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 35
35
36
37
Referring to: OWN user logons Transaction SM04 rdisp/rfc_max_own_login Default value: 25 %
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 38
38
Referring to: number of work processes Transaction SM50 rdisp/rfc_max_own_used_wp Default value: 75 %
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 39
39
Referring to: number of work processes Transaction SM50 rdisp/rfc_min_wait_dia_wp Default value: 1
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 40
40
Additional hint: SAPNote 74141 Resource Management for tRFC and aRFC
Very detailed and technical description of the configurable profile parameters
41
Further Tips and Tricks: In the SM59 connection of the source system to the BW system, the connection should be set so that a cancelled transmission is NOT started automatically again. Hanging IDOCs (Status 64) => SAPNote 561880 and 555229 Error No RFC destination maintained in the source system, but the destination is existing. => In the RFC destination the language is missing. ABAP runtime error CALL_FUNCTION_REMOTE_ERROR: The termination occurred in the ABAP/4 program "SAPLRSAOS " in "METADATA_20_UPLOAD". The main program was "RDDEXECU ". => SM59 Check MYSELF-Destination , User without password? Its also possible to delete the RFC destination and to recreate it by executing the restore function. Transport of ODS-Objects: Error message: RSDODSO 102 ODS Object ZTST_ORD is not available for version A Check the myself connection in the RFC destination Check in SM59 works fine, but you have communication errors in SM21 during the data upload. Transaction SMGW (in SourceSystem) gives timeout during allocate: Maybe the BW has too less DIALOG processes. For SM59-checking purpose, there are less dialog processes needed than during a data load. In the transaction SMQS in the SourceSystem the number of maximum connections for the destination BW can be set to a value (for example to 10, that means that the SourceSystem tries to get 10 dialog processes in the BW). SM58: Statustext column contains a text like Transaction recorded To much gateway traffic !
Notes: 63483, 38682, 530997, 527481, 460235, 74141 and schedule report RSARFCEX periodically (Message 376965 / 2002). Make sure that the customer implements the actual qRFCversion and the actual supplement.
42
Topics
General remarks Configuration of SAP instance Memory Configuration of the Web Application Server (ST02) Important SAP Buffers and Settings ICM and ICF: Configuration of WebServices Load Balancing Operation System and Hardware Database DB All platforms DB Oracle Basics of Memory Management CBO Statistics Tablespace Management Analysis Roadmaps
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 43
43
Total size of memory configured for SAP (from ST02) and for Database (ST04) must not exceed the size of physical memory available
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 44
44
What processes are runnning? Is the degree of parallelism too high? Additional IO Controller necessary?
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 45
45
Disk Layout
Purpose
Distributing the data accesses across several physical disks. Avoid I/O hot spots Optimize the overall throughput to the disks. Usually storage (sub-)systems are used to handle bigger transparent storage units (and not one physical disks), e.g. RAID systems and RAID arrays.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 46
46
Topics
General remarks Configuration of SAP instance Memory Configuration of the Web Application Server (ST02) Important SAP Buffers and Settings ICM and ICF: Configuration of WebServices Load Balancing Operation System and Hardware Database DB All platforms DB Oracle Basics of Memory Management CBO Statistics Tablespace Management Analysis Roadmaps
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 47
47
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 48
The number of dialogue processes should be by one higher than the other processes (see SAPNote 74141: Resource management for tRFC and aRFC for more details). Note that a BW application server does not need an UP2 process and not more than 2 UPD processes. Check the following SAP notes for the respective underlying DB management system: SAPNote 192658: Setting basis parameters for BW systems SAPNote 180605: Oracle database parameter settings for BW SAPNote 302429: DB2 UDB EEE: Performance on BW 2.0B, 2.1C, 3.0A SAPNote 546262: DB6: Performance on SAP BW 3.0B SAPNote 307077: AS/400: Performance optimizing in BW Systems SAPNote 501572: iSeries: EVI stage 2 support SAPNote 541508: iSeries: Checking the system parameters SAPNote 390016: DB2/390: BW: DB settings and performance SAPNote 181945: Performance guide: BW on Informix SAPNote 327494: Configuration Parameters for SQL Server 2000 SAPNote 28667: Microsoft SQL Server Specific Profile Parameters
48
Solution
In a default BW installation on MS SQLserver the neccessary push buttons are invisible. You can make them visible by running the ABAP/4 report RSDD_MSSQL_PROG_01 This report is sending an output telling if statistic maintenance is enabled or not.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 49
SAPNote 542468
49
Total memory consumption Sum of memory for DataBase Buffers + Shared Pool Size
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 50
Total memory consumption (Oracle 8) Global settings Data buffer + Shared Pool Size + Java Pool Size Process local settings in Oracle 8i hash_area_size sort_area_size bitmap_merge_area_size create_bitmap_area_size PGA Aggregate target in Oracle 9i
50
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 51
51
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 52
Transaction DB02 is frequently used by administrators to check for missing indexes: simply call transaction DB02 and press the button "Missing Indexes". This will lead you to the screen shown in the lower left-hand corner of the slide. If many facttable primary or secondary indexes are missing then you might apply SAPNote 157918: run the ABAP reports
and check DB02 again. Details of the reports are provided on the following slide.
52
SAP_INFOCUBE_INDEXES_REPAIR
applies to all active infocubes and aggregates Re-creates missing P-indexes re-creates missing secondary indexes should be run as a batch job
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 53
BW provides two ABAP reports that are relevant foSAPNote 157918. SAP_UPDATE_DBDIFF This report updates the table DBDIFF which lists tables or tablespaces that do not comply with ABAP dictionary standards. In the context of BW these are facttables withouth primary index and temporary objects (tables, views, triggers, ...). This report will make sure that facttables and temporary objects are properly listed in DBDIFF which in turn is used by DB02. DB02 will take differences into account that are listed in DBDIFF and thus avoid to list those differences as errors. The report has to be run only once in order to make up for differences that originate from BW 1.2 or BW 2.0A and that remained when the system was updated to BW 2.0B. All objects that are created in BW 2.0B or above should be tracked DBDIFF when they are activated. SAP_INFOCUBE_INDEXES_REPAIR This report applies to all active infocubes and their aggregates. It removes existing primary indexes these might be left-overs from BW 1.2 recreate missing Pindexes and recreate missing secondary indexes. This report can be used to repair infocube indexes system-wide, i.e. without looking at each infocube individually. This is particularly interesting for administrators. The report should be run as a batch job as it might run for a while.
53
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 54
SAPNote 449891 The BW System uses different temporary objects for the query and other processes. The system often generates them outside of the ABAP DDIC for performance reasons or because they cannot be defined there (as stored procedures or triggers). The SAP_DROP_TMPTABLES report deletes all objects (except for the tempor ary hierarchy tables) without taking into account whether or not they are still in use. This can result in terminations of queries, compression and data extraction, for example, if these are running simultaneously. If temporary objects prove to be inconsistent under DB02, you must execu te report SAP_UPDATE_DBDIFF once. If you use the DB02 afterwards once again, you must make sure that the system refreshes the results. The report copies information on differences between definitions in the ABAP DDIC and in the DB catalog into table DBDIFF. DB02 includes the table during the check for inconsistencies.
54
Solution
Using the Cost Based Optimizer can dramatically improve the accesses to DDIC
In an SAP BW installation all optimization and execution techniques like HASH JOINS or BITMAP OPERATIONS are enabled by having the correct initialization parameters set in the init<SID>.ora Statistics have to created on data dictionary tables and clusters.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 55
SAP Note 558746 The following script allows you to create the necessary optimizer statistics. The script must be run from sqlplus under the database user SYSDBA. his script should only be applied to a BW system and NEVER (!!!) to a R/3 System: set timing on set echo on spool ana_dict execute dbms_stats.gather_schema_stats ('SYS',cascade=>true,degree=>4); analyze cluster C_OBJ# compute statistics ; analyze cluster C_USER# compute statistics ; analyze cluster C_FILE#_BLOCK# compute statistics ; analyze cluster C_TS# compute statistics ; analyze cluster C_COBJ# compute statistics ; analyze cluster C_MLOG# compute statistics ; analyze cluster C_RG# compute statistics ; analyze cluster C_OBJ#_INTCOL# compute statistics ; analyze cluster C_TOID_VERSION# compute statistics ;
55
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 57
57
Solution
As of SP8 (BW3.0B) possible. Report SAP_RSADMIN_MAINTAIN with the following parameters: OBJECT = ORA_DBMS_STATS VALUE = 0 (analyze), 1 (noparallel with histograms), >1 (parallel without histograms)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 58
See SAP Note 351163 for details to create CBO statistics with DBMS_STATS package. As an alternative to the traditional ANALYZE TABLE command, Oracle allows you to create database statistics using the PL/SQL package DBMS_STATS.The advantages of this are improved performance since DBMS_STATS can determine statistics in parallel -, however, with the restriction that the table statistics are created without histograms. Histograms are generally required to select efficient execution plans in the context of BW queries for the Oracle optimizer.In contrast to this, it is taking customers a very long time to calculate DB statistics if there is a very large data volume.DBMS_STATS may be an alternative here. If a bottleneck arises in the statistics calculation, you should test the approach described here and then monitor the performance of BW queries afterwards.If you notice that the performance is impaired, you should no longer use DBMS-STATS and return to the traditional ANALYZE TABLE method. The option of calculating Oracle statistics via DBMS_STATS is available as of BW 2.0B Support Package 8.In Oracle-based BW 3.x systems, DBMS_STATS is the standard method for calculating Oracle statistics (see below). Isolated errors occur within DBMS_STATS (for example, ORA-20000, ORA-4021, ...). These errors will be solved in future Oracle releases.In this case, you must convert the "ANALYZE TABLE method" again. parallel degree = 0: ANALYZE TABLE ... is used parallel degree = 1: DBMS_STATS is used;histograms are created (size = 75) (default) parallel degree > 1: DBMS_STATS is used; parallel execution;no histograms Dont mix creating CBO statistics with the ANALYZE command and the DBMS_STATS package. See SAP note 489352. Histograms: The histogram captures the distribution of different values in a column, so it yields better selectivity estimates. Having histograms on columns that contain skewed data (in other words, values with large variations in number of duplicates) greatly helps the CBO generate good selectivity estimates.
58
Solution
As of SP6 (BW3.0B) possible. Report SAP_RSADMIN_MAINTAIN with the following parameters: OBJECT = DB_STATISTICS VALUE = OFF
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 59
59
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 60
60
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 61
brconnect -u / -c -f stats -t all -f monit Create statistics and if there is no MONITORING attribut, it will be created.
61
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 62
Alternative you can check the statistics by analyzing the log of BRCONNECT (DB14).
62
Locally managed tablespaces With each SAP standard Installation on Basis 6.10 or higher all SAP tablespaces are locally managed except PSAPROLL and SYSTEM only 6 tablespaces after installation
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 63
63
Dictionary managed
Extent allocation Oracle has to update the appropriate dictionary tables (FET$, UET$), whenever an extent is allocated or freed for reuse and must store rollback information about each update of these objects.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 64
Locally Managed Tablespaces A tablespace that manages its own extents maintains a bitmap in each datafile to keep track of the free or used status of blocks in that datafile. Each bit in the bitmap corresponds to a block or a group of blocks. When an extent is allocated or freed for reuse, Oracle changes the bitmap values to show the new status of the blocks. These changes do not generate rollback information because they do not update tables in the data dictionary (except for special cases such as tablespace quota information). Dictionary Managed Tablespaces If you created your database with an earlier version of Oracle, then you could be using dictionary managed tablespaces. For a tablespace that uses the data dictionary to manage its extents, Oracle updates the appropriate tables in the data dictionary whenever an extent is allocated or freed for reuse. Oracle also stores rollback information about each update of the dictionary tables. Because dictionary tables and rollback segments are part of the database, the space that they occupy is subject to the same space management operations as all other data.
64
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 65
Locally managed tablespaces have the following advantages over dictionary managed tablespaces: Local management of extents automatically tracks adjacent free space, eliminating the need to coalesce free extents. Local management of extents avoids recursive space management operations. Such recursive operations can occur in dictionary managed tablespaces if consuming or releasing space in an extent results in another operation that consumes or releases space in a data dictionary table or rollback segment. The sizes of extents that are managed locally can be determined automatically by the system. Alternatively, all extents can have the same size in a locally managed tablespace and override object storage options. The LOCAL clause of the CREATE TABLESPACE or CREATE TEMPORARY TABLESPACE statement is specified to create locally managed permanent or temporary tablespaces, respectively.
65
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 66
66
67
Aggregates of IC SALES01
Technical settings
Tablespace PSAPSALES
Tablespace PSAPSALES
68
Automatic UNDO Management PGA: Automatic Memory Management SGA: Dynamic Resizing Multiple Block Size Support
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 69
69
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 70
70
PSAPUNDO)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 71
71
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 72
72
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 73
73
Untunable Memory
Process PGA
95 %
5%
<= PGA_AGGREGATE_TARGET
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 74
74
Untunable Memory
Tunable Memory
Process PGA
5%
95 %
<= PGA_AGGREGATE_TARGET
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 75
75
WORKAREA_SIZE_POLICY Specifies the policy for sizing work areas and controls the mode in which work areas are running MANUAL (Default) AUTO (Default if PGA_AGGREGATE_TARGET is set)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 76
76
Ideal case: only optimal executions, no onepass, no multipass... But hard to realize
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 77
77
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 78
78
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 79
79
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 80
80
SHARED_POOL_RESERVED_SIZE
Shared Pool
SHARED_POOL_SIZE
Buffer Pool
Default Recycle Keep
DB_BLOCK_BUFFERS
BUFFER_POOL_RECYCLE BUFFER_POOL_KEEP
Static memory configuration Recycle Pool and Keep Pool are defined out of all DB_BLOCK_BUFFERS
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 81
Keep: table is automatically kept in memory, read operations are then not processed by the LRU algorithm, but are read directly Recycle: the contrast of the keep pool Shared_Pool_Reserved_Size: if very large objects are required and requested
81
Shared Pool
SHARED_POOL_SIZE
Keep Recycle
DB_KEEP_CACHE_SIZE DB_RECYCLE_CACHE_SIZE
Default
DB_CACHE_SIZE
SGA_MAX_SIZE
9i memory components can be changed dynamically -> no database restart necessary
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 82
82
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 83
83
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 84
84
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 85
85
Shared Pool
SGA_MAX_SIZE
DB_16K_CACHE_SIZE
DB_CACHE_SIZE
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 86
86
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 87
87
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 88
88
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 89
89
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 90
SAPNote 701235 PSA: The PSA tables could be compressed if the data will be stored for a longer period Cubes: Historical Cubes (e.g. sales cube 1999) are suiteable objects for compression. Looking at partitions it is the same. "Old" partitions which are not being changed could be compressed. Aggregates: In general the aggregates should not have navigational attributes, if you want to compress aggregates. If you have nav. attributes and you change the value, the compression will be lost due deletes and updates. ODS: The ODS has 3 physical tables (activation queue, active data and change log) The change log could be compressed without any restrictions. (Only inserts are applied) The activation queue should not be compressed, because normally the data is deleted after activation. The active data could be compressed but you have to keep in mind if the number of updates is higher than the number inserts the compression will be lost after a certain time. Please keep in mind that the ABAP Dictionary does not currently support compression. This means that the compression is lost when a compressed table is reorganized.
90
Oracle 9i: ASSM Automatic Segment Space Management In Detail: Hierarchical structure of bitmap blocks
Segment Header
Level 2
Level 1
Level 1
Level 1
92
Oracle 9i: ASSM Automatic Segment Space Management In Detail: A table with 4 extents and 8 blocks each
E1 1 2 Segment 3
E2
Segment 3
E3 E4
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 93
At every time its known how much each data block is filled (in 25% steps)
93
SEGMENT_SPACE_MANAGEMENT = AUTO -> Locally Managed Tablespace using Automatic Segment Space Management (since SAP basis release 6.40) SEGMENT_SPACE_MANAGEMENT = MANUAL -> Locally Managed Tablespace using Free Lists
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 94
94
APPENDIX
95
SAPConnect
Configuration of SAPConnect
Sending an email for information about failed requests: Some information in message 131724. Configuration of SAPCONNECT: 1. Change the instance profile in RZ10 2. Add a system background user for messages 3. Configure SICF 4. Configure SCOT Note 455140 contains some info about this.
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 96
96
Press 'Source system assignment' button (it's the one left of the 'Request BEx' button) Select the source systems you want to save the transfer rules for Continue Button 'Grouping' set to 'Save for system copy Extend tree 'Source system' LSYS At the left border click on 'Object Types'
Select the source systems you want to collect objects for the source system is now displayed in the right box Press collecting button ('gather dependent objects') this may take a while
Right click on the root of the tree and select Transport all below Expand the whole tree and check if there isn't an object which is locked by an other open transport request !! (the column 'Transport request' has to be empty !) Press the transport button => A transport request is created. Check if the request contains all ISMP and ISTS objects. Release the request! (BEFORE deleting the corresponding source system connection!)
SAP AG 2005, 02 Customizing and Basic Architecture of SAP BW 3.x Performance, Pascal Prassol / 97
97