52
1 Jay Narayanan OfficeMax BW Technical Team Lead Performance Tuning Massive SAP BW Systems - Tips & Tricks

Performance Tuning Massive SAP BW Systems - Tips and Tricks

Embed Size (px)

DESCRIPTION

Performance Tuning of SAP BW

Citation preview

Page 1: Performance Tuning Massive SAP BW Systems - Tips and Tricks

1

Jay NarayananOfficeMax

BW Technical Team Lead

Performance Tuning Massive SAP BW Systems - Tips & Tricks

Page 2: Performance Tuning Massive SAP BW Systems - Tips and Tricks

2

SAP Systems at OfficeMax

Retail and Core Business

Business Intelligence and Modeling

Customer Call Center

DecentralizedWarehouse Management

Systems

•Order Status•Inventories •Customers

•Orders

•Campaign Analysis

•Market Basket(data mining)•Customer Analysis

•Sales, Inventory•Purchasing, etc. •Sales Analysis

(infospoke)

WM3WM1

Las VegasHazelton,

PennsylvaniaMcCalla,Alabama

WM3WM3WM3WM2

WM3Retail

WM3CRM WM3BW/SEM

(Cleveland, Dallas)

CA

AZ OK

FL

NM

TX

NVUT

ORID

WAMT ND

SD

IA

MN WI

ILIN OH

MIPA

WV VANC

SC

NYVT

NH

ME

MACTNJ RI

DEMD

GAAL MSLA

ARTN

MO KYCO

WYNE

KS

•Financial Simulation(transactional cube)

Shaker Heights,Ohio

Shaker Heights,Ohio

Shaker Heights,Ohio

•Vendor Shipments•Deliveries due •Master Data

•Deliveries made•Inv Adjustments

Page 3: Performance Tuning Massive SAP BW Systems - Tips and Tricks

3

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 4: Performance Tuning Massive SAP BW Systems - Tips and Tricks

4

BW Technology Platform

Solaris 2.8SUN E10K48-CPU / 48GB

Hitachi 9960(6TB/Monthly Growth 25GB)

BW 3.1C (SP15)

SEM 3.2B (sp12)

Oracle 9.2

Windows XPSAP GUI 6.20

SAP Portal 6.0 Crystal Enterprise 8.5IGS

1 App ServerSUN V8808-CPU / 32GB

NT Servers8-CPU

Page 5: Performance Tuning Massive SAP BW Systems - Tips and Tricks

5

Cubes Aggregates ODS

SALES 12 40 5

INVENTORY 12 76

PURCHASING 2 4 2

FINANCE 6 4

HR 1 2

CRM 1 3 2

SEM 6

STAFFWORKS 3 3 3

BW STATISTICS 6

Others 5 4

Application Areas & InfoProviders

Page 6: Performance Tuning Massive SAP BW Systems - Tips and Tricks

6

Performance Statistics for Loads

242 hrs1.4 mCube & ODSPurchasing

1040 mins140 KFull/Delta LoadMaster Data (27 info objects)

75

1

2 hours

1.5 hours

27 m

27 m

Cube Load

Rollup

Inventory Snapshot

Change run

Cube Load

ODSRollup

Compression

ProcessProcess

83 hours20000Master Data

Alignment

24

24

8

1

30 mins

1.5 hours (actv)

15 minutes

20 mins

1.8m

1.8 m

1.8 m

Sales

StreamsStreamsRuntimeRuntimeRecordsRecordsDataData

Page 7: Performance Tuning Massive SAP BW Systems - Tips and Tricks

7

BW Users - Yearly

0

100

200

300

400

500

600

700

Year-2004

Year-2003

Year-2002

Year2001

Users

680

504

195

149

Page 8: Performance Tuning Massive SAP BW Systems - Tips and Tricks

8

BW Users - Daily

2

226

141

96 9198

57

178

150

121 117

99106

52

92

222

0

50

100

150

200

250

8/16/2004 8/23/2004 8/30/2004

Users

Page 9: Performance Tuning Massive SAP BW Systems - Tips and Tricks

9

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 10: Performance Tuning Massive SAP BW Systems - Tips and Tricks

10

InfoCube with no Line Item Dimension

Dimension Table

Master data Sid table

Fact TableMaster data

Sid tableMaster Data

Sid table

InfoCube with Line Item Dimension

Dimension Table

Fact TableDimension Table

Master Data Sid Table

DatabaseView

Modeling – Performance aspects - 1

• Line Item Dimensions

Page 11: Performance Tuning Massive SAP BW Systems - Tips and Tricks

11

Modeling – Performance Aspects - 2

Line Item Dimensions & Cardinality

Page 12: Performance Tuning Massive SAP BW Systems - Tips and Tricks

12

Modeling – Performance Aspects - 3

Logical Partitioning – Yearly cubesParallel queries run on basic infocubes

Change run can be run parallel

Year 2004 Cube Year 2003 Cube Year 2002 Cube

Page 13: Performance Tuning Massive SAP BW Systems - Tips and Tricks

13

Modeling – Performance aspects - 4Run Program SAP_INFOCUBE_DESIGNS for existing Infocubes

Compression ratio

Page 14: Performance Tuning Massive SAP BW Systems - Tips and Tricks

14

Modeling – Performance Aspects - 5

Physical Partitioning

Aggregates

Navigational attributes

Database partitions and

secondary Indexes on ODS.

Dimensions with more than one Characteristic

Page 15: Performance Tuning Massive SAP BW Systems - Tips and Tricks

15

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 16: Performance Tuning Massive SAP BW Systems - Tips and Tricks

16

Data Load Performance

Data Load from Source System

Configuring ROIDOCPRMS table

Transaction SBIW

General Settings->Maintain Control Parameters for Data Transfer

Refer OSS Note : 417307

Infosource specific values can be maintained in Scheduler

TSV_TNEW_PAGE_ALLOC_FAILED if Packet Size is Huge

Reorg ARFCSDATA & ARFCSSTATE tables

Flat File load Performance

Maintain the parameters thru transaction RSCUSTV6

Load from application server not from Client

reduces network load.

Page 17: Performance Tuning Massive SAP BW Systems - Tips and Tricks

17

Data Load Performance – Number Range Buffering - 1

When loading large quantities of data into an InfoCube, the number range buffer should be increased for the dimensions that are likely to have a high number of values

Use Function module RSD_CUBE_GET to Identify the object name of the dimension.

Page 18: Performance Tuning Massive SAP BW Systems - Tips and Tricks

18

Data Load Performance – Number range buffering - 2

Use Transaction SNRO ->EDIT-> Setup Buffering->Main memory

Never set buffering for package dimension

set the values between

500 and 1000.

Page 19: Performance Tuning Massive SAP BW Systems - Tips and Tricks

19

Data Load Performance – Load Balancing - 1

Use transaction SMLG and create logon group

Logon group for Load balancing

BW system

Page 20: Performance Tuning Massive SAP BW Systems - Tips and Tricks

20

Data Load Performance – Load balancing - 2

Change RFC settings in the source system

Use transaction SM59

Source system

Page 21: Performance Tuning Massive SAP BW Systems - Tips and Tricks

21

Data Load Performance Drop Unused Partitions

Use program SAP_DROP_EMPTY_FPARTITIONS

Avoid Long execution times for Index rebuild

Page 22: Performance Tuning Massive SAP BW Systems - Tips and Tricks

22

Data Load Performance

Drop and recreate source twin Structures

Program LMCSWTOP set flag FLG_DCT = ‘X’

Drop and Recreate Bitmap indexes on F table

Use Parallel Processing

ODS loads & activation parallel

Check Update / Transfer rules

Index on source tables for full loads with selection

Define PSA Part. size using transaction RSCUSTV6

Minimum no. of records in a PSA partition

Use program SAP_PSA_PARTITION_COMPRESS for existing PSA tables

Compress Cubes and aggregates regularly

Page 23: Performance Tuning Massive SAP BW Systems - Tips and Tricks

23

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 24: Performance Tuning Massive SAP BW Systems - Tips and Tricks

24

Change run performance - 1How Change run works on aggregates

Inserts new records positively and old records negatively

Page 25: Performance Tuning Massive SAP BW Systems - Tips and Tricks

25

Change run Performance - 2Function module RSCDS_CONDENSE_CUBE

Aggregate name

Enter X for aggregate

Value of cnsid_to of table rsddaggrdir

Page 26: Performance Tuning Massive SAP BW Systems - Tips and Tricks

26

Change run Performance – Threshold & Block size

Transaction RSCUSTV8

If the Changes more than 20%Aggregates are rebuilt

Choose the block size depending on the Temporary

table space available

Page 27: Performance Tuning Massive SAP BW Systems - Tips and Tricks

27

Change run Performance - Setting Change run Parallel -1

Create an RFC server group using transaction RZ12

Page 28: Performance Tuning Massive SAP BW Systems - Tips and Tricks

28

Change run Performance - Setting Change run Parallel -2

After the RFC server group is defined use report SAP_RSADMIN_MAINTAIN to create the object entries CR_RFCGROUP in the table RSADMINOSS Note – 534630 Parallel Processing of Change runParallel Processing of Change run Increases memory consumption

Maximum no. of work processes

RFC Server Group

Page 29: Performance Tuning Massive SAP BW Systems - Tips and Tricks

29

Change run Performance – Monitoring - 1

Use Table RSDDSTATAGGR to find the run times

Page 30: Performance Tuning Massive SAP BW Systems - Tips and Tricks

30

Change run Performance – Monitoring - 2

Program RSDDS_CHANGERUN_MONITOR

Page 31: Performance Tuning Massive SAP BW Systems - Tips and Tricks

31

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 32: Performance Tuning Massive SAP BW Systems - Tips and Tricks

32

Query Performance - 1Cause of Query Performance issues

Database

Database parameters may not be set properly(OSS note :180605)

Database Statistics is not setup properly

Degenerated Indexes

Check if database partitioning is used

Possibility of building an aggregate

ORACLE_PARALLEL_DEGREE value in RSADMIN

OLAP

BW Basis parameters (OSS Note : 192658)

Buffers, I/O, CPU, memory on the database server are exhausted

Check the Read mode of queries / cubes

Check the no. of available dialog processes

Usage of restricted / Calculated keyfigures in the query

Frontend

Check the amount of data being transferred

Page 33: Performance Tuning Massive SAP BW Systems - Tips and Tricks

33

Query Performance - 2

Build Aggregates

OLAP Cache

Pre Calculated Value Sets

Pre Calculated Web Templates

Logical Partitioning - Multi Providers

Physical Partitioning

Look for degenerated Indexes

Compress Infocubes regularly

Page 34: Performance Tuning Massive SAP BW Systems - Tips and Tricks

34

Query Performance – OLAP Cache

OLAP Cache Settings using transaction RSCUSTV14

Page 35: Performance Tuning Massive SAP BW Systems - Tips and Tricks

35

Query Performance – Pre Calculated Web Templates

Maintain the settings in Reporting Agent

Page 36: Performance Tuning Massive SAP BW Systems - Tips and Tricks

36

Query Performance – Pre-Calculated Valuesets

Page 37: Performance Tuning Massive SAP BW Systems - Tips and Tricks

37

Query performance Tuning Techniques - 1Switch on Statistics

Page 38: Performance Tuning Massive SAP BW Systems - Tips and Tricks

38

Query Performance Tuning Techniques - 2

ST03N Expert mode

Page 39: Performance Tuning Massive SAP BW Systems - Tips and Tricks

39

Query Performance Tuning Techniques - 3Run Transaction SM66Identify the process idRun transaction ST04 and find the process in Oracle sessionGet the execution Plan

Partition start and Stop

Page 40: Performance Tuning Massive SAP BW Systems - Tips and Tricks

40

Query Performance Tuning Techniques - 4

Switch on/off aggregates

Page 41: Performance Tuning Massive SAP BW Systems - Tips and Tricks

41

Query Performance Tuning Techniques - 5

Read mode (Table RSRREPDIR)

Tables RSDDSTAT / RSDDSTATAGGR

Cache Monitor(RSRCACHE)

Function Module RSDDCVER_RFC_BW_STATISTICS

BW Stats Cubes

RSRT

RSRTRACE

Page 42: Performance Tuning Massive SAP BW Systems - Tips and Tricks

42

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 43: Performance Tuning Massive SAP BW Systems - Tips and Tricks

43

Aggregate Rollup & Compression Performance

Aggregates RollupCompress Cubes & aggregates regularly

Rebuild Indexes on Etable of aggregates

Build statistics on Aggregate tables

Include partitioning Characterstic in the aggregates

Do not build stats on the F table of the cube

Compression PerformanceMake sure P index exists on the Etable of Cube & aggregates

Aggregates Ftable size

Page 44: Performance Tuning Massive SAP BW Systems - Tips and Tricks

44

Aggregate Rollup & Compression Performance

Aggregates RollupCompress Cubes & aggregates regularly

Rebuild Indexes on E table of aggregates

Build statistics on Cubes & Aggregates

Include partitioning Characteristic in the aggregates

Do not build stats on the F table of the cube if the table is huge

Compression PerformanceMake sure P index exists on the E table of Cube & aggregates

Aggregates F table size

Page 45: Performance Tuning Massive SAP BW Systems - Tips and Tricks

45

BW Technical Overview

Modeling

Extraction

Changerun

Queries

Compression & Aggregates Rollup

SEM BPS Functions

Agenda

Page 46: Performance Tuning Massive SAP BW Systems - Tips and Tricks

46

SEM BPS Performance - 1Activate Statistics

Transaction BPS_STAT0

Activate Stats

Page 47: Performance Tuning Massive SAP BW Systems - Tips and Tricks

47

SEM BPS Performance - 2

Database Parameter Settings ( OSS Note : 358921)

Executing Specialized functions faster than General functions (eg:- Copy function instead of writing formula to copy)

Program UPC_BW_SELECTION_DEBUG can be used to do the analysis of read access in SEM-BPS

Save the results after ending a planning session before starting another transaction since the memory is released only after the save or exiting the session.

Compress the Infocubes

Build aggregate if possible

Code Formula functions effectively avoiding multiple loops

Page 48: Performance Tuning Massive SAP BW Systems - Tips and Tricks

48

Summary

Check Oracle Parameter & Basis Parameter Settings

Deploy Parallel Processing wherever possible

Look for degenerated Indexes

Use transactions ST03N / ST04 / ST02

ROIDOCPRMS table settings for Load Performance

Make use of Load balancing

Use OLAP Cache

Use Pre-Calculated Value sets and Web Templates

Page 49: Performance Tuning Massive SAP BW Systems - Tips and Tricks

49

Q&A

Questions?

Page 50: Performance Tuning Massive SAP BW Systems - Tips and Tricks

50

Please complete your session evaluation.

Be courteous — deposit your trash, and do not take the handouts for the following

session.

Feedback

Thank You !

Page 51: Performance Tuning Massive SAP BW Systems - Tips and Tricks

51

SAP Developer NetworkLook for SAP TechEd ’04 presentations and videos on the SAP Developer Network.

Coming in December.http://www.sdn.sap.com/

Page 52: Performance Tuning Massive SAP BW Systems - Tips and Tricks

52

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other

Copyright 2004 SAP AG. All Rights Reserved