ALM160 System Performance Tuning
-
Upload
sridi-mohamed -
Category
Documents
-
view
223 -
download
0
Transcript of ALM160 System Performance Tuning
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 1/25
1
ALM160
System Performance Tuning for
Beginners
Jeff DePianta, Tami Morrison, William AdamsPerformance and Scalability, SAP AG
Dr. Heiko Gerwens & Ingo BohnPerformance and Scalability, SAP AG
© SAP AG 2009. All rights reserved. / Page 2
Disclaimer
The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission of SAP. This presentation is not subject to your license agreement or any other service or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation and SAP's strategy and possible future developments, products and or platforms directions and functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The information on this document is not a commitment, promise or legal obligation to deliver any material, code or functionality. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. This document is for informational purposes and may not be incorporated into a contract. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.
All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 2/252
© SAP AG 2009. All rights reserved. / Page 3
1. Introduction to Performance Monitoring of AS ABAP and AS JAVA
2. Hardware2.1. AS ABAP2.2. AS JAVA
3. Database3.1. AS ABAP3.2. AS JAVA
4. Application4.1. AS ABAP
4.2. AS JAVA
5. Conclusion
Agenda
© SAP AG 2009. All rights reserved. / Page 4
Strategy for Performance Analysis and
Optimization
Blockwise analysis: Top down
Use monitoring tools for bottleneck analysis
Broad, global scope
Improves the situation
Quick
Program-independent
procedure
HardwareDatabase
ApplicationCommunication
System Analysis
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 3/253
© SAP AG 2009. All rights reserved. / Page 5
Performance-Relevant Components of NW
Double Stack Installation
Application Server
WebDynproWebDynpro
ICM
Java ABAP
Workprocess
SAP Web Dispatcher
DBMS
Database
DBWP
HTTP, SOAP
HTTP, SOAP
HTTP
JCo
DBWP
DBWP
DBWP
RFC
ABAP Dispatcher
Globalbuffers &caches
Sharedmemory &buffers
Servernode
JCo
SAPGUI
DIAG
Applications are usually deployed as ABAP only and Java only. Dual stack is used in BI and PI.
© SAP AG 2009. All rights reserved. / Page 6
Most Commonly Used Tools and Monitors –
AS ABAP
Area System-Wide Single-User
Hardware
Application server OS06 (ST06), OS07
Database
General DBACOCKPIT
DB accesses ST10 ST05, STAD
Application
Shared memory & buffers ST02, SHMM
ABAP runtime SAT (SE30)
User memory analysis SM04 S_MEMORY_ INSPECTOR
Work process overview SM50, SM66
Workload analysis ST03N STAD
Enqueue monitoring SM12 ST05
Communication
HTTP traffic SMICM, ST03G SMICM
Remote Function Calls ST03N ST05
Browser
Workprocesses
ICM
Sharedmemoryandbuffers
AS ABAP
ABAP dispatcher
Central services
Message server
Enqueue server
Database(ABAP schema)
GW
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 4/254
© SAP AG 2009. All rights reserved. / Page 7
Most Commonly Used Tools and Monitors –
AS JAVA
Area JAVA
Hardware
Application server OS06 (ST06), OS07, SAP MC
Database
General DBACOCKPIT, DB02 (Java schema)
DB accesses NWA: Open SQL Monitors, WilyIntroscope, SAP JVM Profiler
Application
Global Buffers and Caches SAP MC, NWA: Open SQL Monitors
JAVA runtime Wily Introscope, SAP JVM Profiler
User memory analysis SAP JVM Profiler
Server nodes / threadoverview
NWA: Operations Management, SAP MC
Workload analysis Wily Introscope
Enqueue monitoring NWA: Open SQL Monitors, SAP MC
Communication
HTTP traffic HTTPwatch, NWA, SAP MC
Remote Function Calls NWA, SAP JVM Profiler, Wily Introscope
Browser
servernodes/threads
ICM
GlobalBuffersandCaches
AS Java
cluster manager
Central services
Message server
Enqueue server
Database(Java schema)
GW
© SAP AG 2009. All rights reserved. / Page 8
1. Introduction to Performance Monitoring of AS ABAP and AS JAVA
2. Hardware2.1. AS ABAP2.2. AS JAVA
3. Database
3.1. AS ABAP3.2. AS JAVA
4. Application4.1. AS ABAP4.2. AS JAVA
5. Conclusion
Agenda
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 5/255
© SAP AG 2009. All rights reserved. / Page 9
Helpful Information from the Operating
System Monitor – AS ABAP (HW)
For a detailed analysis, there
are dedicated monitors
No. of CPUsCPU utilization ratio
Free memory & paging
Disk utilization, response times, queue length
Network utilization/errors
© SAP AG 2009. All rights reserved. / Page 10
Helpful Information from the Operating System
Monitor –
AS JAVA (HW)
OS information also available in SAP MC
URL: http://<hostname>:5<SysNr.>13
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 6/256
© SAP AG 2009. All rights reserved. / Page 11
1. Introduction to Performance Monitoring of AS ABAP and AS JAVA
2. Hardware2.1. AS ABAP2.2. AS JAVA
3. Database
3.1. AS ABAP3.2. AS JAVA
4. Application
4.1. AS ABAP4.2. AS JAVA
5. Conclusion
Agenda
© SAP AG 2009. All rights reserved. / Page 12
DBACOCKPIT: Situation on the Database,
Utilization, Disk I/O –
AS ABAP (DB)
DBMS specific – Somecommon checks for OLTPsystems
Data buffer quality:96% - 98%
Catalog (meta data) cachequality: >= 99-100%
Full table scans = 0
Sort operations on disk = 0
Number of rollbacks = 0
Deadlocks = 0
SQL Cache/StatementAnalysis
Locks or exclusive waits
Data Buffer quality
Catalog Cache quality
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 7/257
© SAP AG 2009. All rights reserved. / Page 13
please note :choose the Java
schema to get theappropriate figures
In double stackinstallations AS JAVAand AS ABAP run onthe same DB(therefore figures inDBACOCKPIT are―shared‖)
Usability andinterpretation offigures is identical toold ST04
DBACOCKPIT: Situation on the Database,
Utilization, Disk I/O – AS JAVA (DB)
© SAP AG 2009. All rights reserved. / Page 14
DBACOCKPIT: Problem Analysis on Database,
Monitors for Performance –
AS ABAP (DB)
Different tools for different problemareas available, e.g.
SQL Locks SQL Performance
etc. …
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 8/258
© SAP AG 2009. All rights reserved. / Page 15
NWA > Open SQL Monitors: Lock Overview –
AS JAVA (DB)
http://<hostname>:<port>/nwa
NWA Problem Management Database Open SQL Monitors Native DB Monitors Show Current Exclusive Lock Wait Situations
© SAP AG 2009. All rights reserved. / Page 16
Trace can beactivated per eachapplication serveronly
Only one trace ―in
parallel‖
New: also call stackavailable
ST05: SQL Trace –
AS ABAP (DB)
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 9/259
© SAP AG 2009. All rights reserved. / Page 17
Trace can be activated pereach server node
Also call stack available
Open SQL Monitors: Tracing SQL Accesses to
the DB – AS JAVA (DB)
© SAP AG 2009. All rights reserved. / Page 18
1. Introduction to Performance Monitoring of AS ABAP and AS JAVA
2. Hardware2.1. AS ABAP2.2. AS JAVA
3. Database3.1. AS ABAP3.2. AS JAVA
4. Application4.1. AS ABAP4.2. AS JAVA
5. Conclusion
Agenda
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 10/2510
© SAP AG 2009. All rights reserved. / Page 19
ST02: Tune Summary on Application Server –
AS ABAP (APP)
Buffers
There must be no swaps on
SAP buffers check free space and freedirectory entries
Constant number of databaseaccesses (steady state)
No invalidations (not countedas swaps!)
© SAP AG 2009. All rights reserved. / Page 20
ST02: Table Call Statistics (directly via ST10)
– AS ABAP (APP)
Buffer State = valid
Optimal: No invalidations
Acceptable: Ratio of invalidations toreads is <1% ( )
◄
◄
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 11/2511
© SAP AG 2009. All rights reserved. / Page 21
ST02: Tune Summary, Memory Quality –
AS ABAP (APP)
SAP memory = User contexts
MaxUse < In Mem
Autoextend on some OS up toem/max_size_MBWindows, Linux 32bit
Check Use SM04 to determine the
top memory consumersobserve growth, may bememory leak
"Old sessions" adjusttimeout parameter for user orplugins
© SAP AG 2009. All rights reserved. / Page 22
NWA: Buffer and Cache Status (1) –
AS JAVA (APP)
Cached systemtables
Buffer type „single―
or „full―
URLhttp://<hostname>: <port>/nwa ProblemManagement Database OpenSQL Monitors
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 12/2512
© SAP AG 2009. All rights reserved. / Page 23
NWA: Buffer and Cache Status (2) –
AS JAVA (APP)
Take care offree size
Cacheefficiency
Number ofmodifications
© SAP AG 2009. All rights reserved. / Page 24
NWA > Open SQL Monitors: Table Call
Statistics –
AS JAVA (APP)
Interpretation of figures is identical to ST02/ST10
Take care of selects, inserts, updates and deletes
No buffer states
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 13/2513
© SAP AG 2009. All rights reserved. / Page 25
SAP MC: GC History –
AS JAVA (APP)
SAP Systems SID Instance AS Java GC History
© SAP AG 2009. All rights reserved. / Page 26
Exercise on Checking the System Status –
AS ABAP
Logon to the system and find out
How many CPUs and how much main memory the server has
How much free memory the server has
Which of the previous days showed the highest CPU usage
The size of the data buffer of the database and the buffer quality
How many users are currently working on the application server(s)
Which user allocates most memory
Whether there are any problems with the SAP buffers
15 min
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 14/2514
© SAP AG 2009. All rights reserved. / Page 27
Exercise on Checking the System Status –
AS JAVA
Logon to the NWA and start SAP MC and find out
How many Java server nodes are running in the Java cluster
How often minor and full GCs where happening on the server node
How much heap memory is configured for each server node and how many of it is currentlyoccupied
10 min
© SAP AG 2009. All rights reserved. / Page 28
Guidelines for Using SM66 to Look –
AS ABAP (APP)
Checklist
Check for blocked work processes
CPIC RFC problems, non-DIA-WPs
PRIV Insufficient extendedmemory
Semaphore many different, F1 help ENQ Problems with message/
enqueue server
Active programs
SAPLNRIV Number range buffer
SAPLGLIV Improve COMMIT times ondatabase (ERP)
Long running SQL Statements
Problems with Cost Based Optimizer
Checklist
Do most work processes execute DB commands?
DB bottleneck(CPU, memory, buffer sizes, I/O, ST04)
DB locks(WP accessing the same row, ST04)
Do program names appear repeatedly? May contain the coding which slows down the
system
Find hot spots with ABAP run time analysis SAT
Other signs of serialization?
Semaphore locks(Generic table buffer, Number range buffer, Roll,…)
Enqueue locks(non-blocking)
Lack of free work processes(root cause?)
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 15/2515
© SAP AG 2009. All rights reserved. / Page 29
SM66: Work Process Overview –
AS ABAP (APP)
16
Involved DBtables
Processing time
Semaphore 16:Generic table buffer
Why did the process stop?
Not typical for
productionsystems
© SAP AG 2009. All rights reserved. / Page 30
SAP MC: Thread Overview –
AS JAVA (APP)
SAP Systems SID Instance AS Java Threads
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 16/2516
© SAP AG 2009. All rights reserved. / Page 31
ST03G Workload Analysis: A Powerful
Analysistool – AS ABAP (APP) AS JAVA (APP)
Checklist
Automatic data collection, aggregation, history
Breakdown of the processing time
CPU
Wait for RFC, http requests, free workprocess, …
DB request time
Memory usage and network traffic
Specialized profiles for
RFC Web requests
VMC
Ranking lists, like Top-50 longest response times
Display single statistical records
Aggregation according to individual criteria
© SAP AG 2009. All rights reserved. / Page 32
ST03G: Statistic Records –
AS ABAP (APP)
Different views on the workload – answers every question
Workload for individual selections on time, server, Type,Program, User, …
Workload aggregation according to time- Day, Week, Month
Workload aggregation according to location- Individual servers, Total
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 17/2517
© SAP AG 2009. All rights reserved. / Page 33
Server B
Server C
Server D
Server E
ST03G – Statistic Records –
AS ABAP (APP)
Different views on theworkload with differentdimensions and filters task type transaction user time
Variety of meaningful KPIs per view
© SAP AG 2009. All rights reserved. / Page 34
ST03G: Statistic Records –
AS ABAP (APP)
…and also for AS JAVA!
Variety of meaningful KPIs per view
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 18/2518
© SAP AG 2009. All rights reserved. / Page 35
SAP JVM Profiler: Profiling (1/5) –
AS JAVA (APP)
Profiling response times of classes/methods on AS Java
Profiling of memory consumption of classes/methods onAS Java
© SAP AG 2009. All rights reserved. / Page 36
SAP JVM Profiler: Profiling (2/5) –
AS JAVA (APP)
Prerequisite:enable debug onAS Java servernode
Debug port isnormally5<SysNr><26>,5<SysNr><27>,... for each ASJava servernode
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 19/2519
© SAP AG 2009. All rights reserved. / Page 37
SAP JVM Profiler: Profiling (3/5) –
AS JAVA (APP)
First step: create profiling configuration
One can profile response times andmemory simultaneously or separately
© SAP AG 2009. All rights reserved. / Page 38
SAP JVM Profiler: Profiling (4/5) –
AS JAVA (APP)
Response timeprofiling: methodtree (hierarchical)
Response timeprofiling: methodstatistic (flat file)
Response timeprofiling: user filter
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 20/2520
© SAP AG 2009. All rights reserved. / Page 39
SAP JVM Profiler: Profiling (5/5) –
AS JAVA (APP)
Memory profiling:allocated objects
Memory profiling:method tree(hierarchical)
Memory profiling:method statistic (flatfile)
Memory profiling:user filter
© SAP AG 2009. All rights reserved. / Page 40
Exercise on Workload Analysis –
AS ABAP
The goal of the exercise is to perform a workload analysis of the systemfor a specific period in the past.
Start the analysis of the workload of the whole system in expert mode for aperiod which will be given by the presenter
Which task type dominates the load during that period?
What does the ―User by Activity‖ profile look like?
Determine the transactions or reports which show the highest average response
times Are there time periods with peak load visible?
Determine the date, time and user name of the single dialog step with the highestresponse time
15 min
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 21/2521
© SAP AG 2009. All rights reserved. / Page 41
Exercise on Workload Analysis –
AS JAVA
The goal of the exercise is to perform a workload analysis of the system for a specific
period in the past and online.
Start the analysis of the workload of the whole system for a period which will begiven by the presenter
Start the appropriate tool to conduct a memory analysis. Let the tool run for about30 seconds and the stop the measurement (alternatively, use the trace fileprovided by the lecturer)
Which user is consuming most of the memory?
What call is consuming most of the memory?
What single objects consume most memory? Who is responsible for theinstantiation for that object(s)?
10 min
© SAP AG 2009. All rights reserved. / Page 42
1. Introduction to Performance Monitoring of AS ABAP and AS JAVA
2. Hardware2.1. AS ABAP2.2. AS JAVA
3. Database3.1. AS ABAP3.2. AS JAVA
4. Application4.1. AS ABAP4.2. AS JAVA
5. Conclusion
Agenda
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 22/2522
© SAP AG 2009. All rights reserved. / Page 43
Conclusion
SAP's monitoring infrastructure provides you with the means to quickly analyze the
performance of the system
System analysis is a procedural approach by which you eliminate the potentialcauses for poor performance
Performance monitoring helps you to decide which follow-on activities are required
Extend hardware
Analyze coding
Analyze business process design
© SAP AG 2009. All rights reserved. / Page 44
Virtual SAP TechEd :
Extend your SAP TechEd Year Round
Best of SAP TechEd at Your fingertips
View sessions that you missed
Replay and review sessions that youattended
Quality SAP TechEd Training
Best Practices
Product Roadmaps
Learn at your own pace
Gain Access to sessions recorded in
2006, 2007, 2008 and2009* (*available December 2009)
24/7 Access online/offline
Flexible Course Syllabus
Volume Licensing
Special Pricing for multiple subscribers
http://www.sdn.sap.com/irj/scn/virtualteched-allsessions
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 23/2523
© SAP AG 2009. All rights reserved. / Page 45
Further Information
Related Workshops/Lectures at SAP TechEd 2009
Session ID, Title, Session Type
Related SAP Education and Certification Opportunities
http://www.sap.com/education/
Instructions: (Delete this element)
Please mention any related
SAP TechEd workshops or lectures. If you have too many sessions to fit on slide, please use a second
Further Information slide for Related Workshops/Lectures.
Instructions: (Delete this element)
Please mention any related SAPcertification and training courses.
SAP Public Web:
SAP Developer Network (SDN): www.sdn.sap.comBusiness Process Expert (BPX) Community: www.bpx.sap.com
SAP BusinessObjects Community (BOC): www.boc.sap.com
Instructions: (Delete this element)
Please mention any related d eveloper areas or forums on SDN.
DEMO
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 24/2524
Thank You!
ContactFeedback
Please complete your session evaluation.
Be courteous — deposit your trash,and do not take the handouts for the following session.
8/2/2019 ALM160 System Performance Tuning
http://slidepdf.com/reader/full/alm160-system-performance-tuning 25/25
© SAP AG 2009. All rights reserved. / Page 49
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 hereinmay 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, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries,eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+,POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex,MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are ei ther trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or othercountries.
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.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respectivelogos are trademarks or registered trademarks of SAP AG i n Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products andservices mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries.
Business Objects is an SAP company.All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only.National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only,without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Groupproducts and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construedas constituting an additional warrant.
Copyright 2009 SAP AG
All Rights Reserved