ABAP管理和性能分析中用到的重要分析工具概述
来源:互联网 发布:整理图片的软件 编辑:程序博客网 时间:2024/05/20 06:54
概括的总结一下BC490的第一章内容:Architecture and Technical Overview(ABAP管理和性能分析中用到的重要分析工具),细节参加BC490教材。
由上图可知,优化程序性能时,关键是优化数据库访问。当然程序逻辑(缓存、内表etc)也很重要。
下面将从两个方面介绍常用的性能检测方法
- The SAP system
- The Database system
The SAP system
SAP系统的三层架构中,Presentation和Application层都可以扩展。而Database层作为centraldata repository是不可扩展的。
ABAP性能分析的两个重要方向:降低程序在应用服务器上的运行时间、降低数据库负载。后者较为重要。
数据在展示层和应用层之间的传输,按照2~10kb的模块进行。在应用层和数据库中之间传输是严格的32kb的大小。
当然还有其他附加的层(如ITS,ICM等),但是与ABAP开发不相关,不做讨论。
Instance和Processes分析
主要使用SM50和SM51两个T-code。
如果想查看系统使用何种数据库、操作系统、系统版本等信息,可以查看Status窗口。
数据访问时间的数量级
上图说明了数据访问时间的数量级区别。但也同时要考虑硬件性能配置。
在一些较小的SAP系统中,一个sap的WP大概会申请5-10MB的内存;12MB的Table buffer;数据库中的数据缓存空间大概需要几个G级别;现代大型数据库安装时大概需要T级别的存储空间。可以使用Quicksizer工具,根据用户需求定制硬件需求。
对话框处理过程
1.Send the user request to the AS
2.Place the user request in the dispatcher queue if all work processes areoccupied
3.Assign the user request to a work process
4.Roll the user context into the work process
5.Attempt to satisfy the SQL statement from the AS buffers
6.Send the SQL statement to the database server if the result was not found in the AS buffer
7.Attempt to satisfy the SQL statement from the database buffer
8.Load the missing data blocks from the disk into the DB buffer
9.Displace blocks from the DB buffer if necessary
10.Send the results to the AS
11.Change table buffer due to DB changes
12.Send the results of the request to the presentation server
13.Roll user context out of the work process
平均响应时间
上图定义了响应时间的各部分组成。也叫平均响应时间。
平均响应时间应该在1S以内。定义为:从接收到用户请求开始,到应用服务器发送响应,这之间的时间间隔。不包括网络通信的时间。
This time, also called the AVERAGE RESPONSE TIME, is composed of thefollowing:
WAITTIME
Time spent by the request in the dispatcher queue
ROLL-IN TIME
Time required to copy the user context into the work process
LOAD TIME
The time required to load and generate program objects (coding,screens, and so on).
PROCESSING TIME
This time results from the calculation. The processing time iscalculated as the response time minus the following times: wait time, roll-intime, load time, database time, enqueue time, roll-wait time
DATABASETIME
Time between sending an SQL statement and receipt of the results(includes network transmission time)
ROLL-OUT TIME
Time required to roll the user context into the roll buffer
CPU TIME
Time spent by the CPU in processing the transaction step (asmeasured by the operating system; not an additive component of the responsetime).
STAD - Transaction Step Analysis
Dialog和Transactionstep都记录在了系统了(静态的记录),可以只用STAD命令查看。
在分析时,注意限定查询条件,以满足特定的查询需求。
双击上图中相应的记录,可查看如下图所示的详细内容。同时还可以查看DB time、Loadtime和 CPU time等。也可以分析DB、RFC访问。
ST03 - Workload Analysis
为了查看系统中最大负载的程序,可以使用负载分析,详细的分析性能问题。
详情界面
注意两个比率:CPU和DB应该不大于相应时间的40%。
The Database System
可以通过以下几个方便监视数据库的性能。
by monitoring thephysical I/O(read and writeaccess to database files),memoryconsumption, CPU consumption,andnetworkcommunication.
The Database Performance Monitor-ST04
注意:不同的数据库,ST04的初始界面可能会不一样。下图是Oracle的分析界面。
Theinitial screen of the database monitor shows an overview of importantparameters:
•Reads:
Datablocks logically read from the database buffer
•Physical reads:
Datablocks read physically from memory systems (hard disks)
•Data buffer size:
Sizeof the data buffer of the database
•User calls:
Numberof SQL statements sent to the database
•Reads / User calls:
Readaccesses to the buffer per SQL statement
特别注意,当Reads / User calls是一个重要的指标,进行SQLcache (cursor cache) 分析。当大于20:1时,则亟待分析。注意系统需要运行较长时间后(几天),才进行性能分析。
Database Cursor Cache(以Y55中MaxDB数据库为例)
示例程序
查找结果(注意过滤条件)
更多分析,日后根据需求进行分析。
注意区分各种类型的语句。
Database Monitor DB02
- ABAP管理和性能分析中用到的重要分析工具概述
- 性能测试中用到的linux命令分析
- 问题排查中用到的工具及通用分析过程
- [性能] abap运行时间分析工具se30(SAT)使用介绍
- Linux性能分析和工具)
- Linux性能分析和工具
- nmon 性能:分析 AIX 和 Linux 性能的免费工具
- nmon 性能:分析 AIX 和 Linux 性能的免费工具
- nmon 性能:分析 AIX 和 Linux 性能的免费工具
- nmon 性能:分析 AIX 和 Linux 性能的免费工具
- Linux platform中用到的数据结构分析
- 性能分析工具的使用
- TraceView性能分析的工具
- Python性能分析概述
- PHP性能分析工具和mysql慢查询分析工具
- VTune 分析和优化程序性能的工具
- nmon:分析AIX和Linux性能的免费工具
- 常用的java性能分析工具和命令
- Java类与Json的转换
- android 快速点击两次出现两个重复界面
- 第十三周项目3:动物这样叫(2)
- JavaScript获取表格中的值
- Android Material Design 一些属性详解
- ABAP管理和性能分析中用到的重要分析工具概述
- 每个程序员都应该了解的 CPU 高速缓存
- Oracel给字段设置索引
- 华为机试---数据分类处理
- android学习笔记--activity生命周期
- Hibernate开发步骤
- 远程服务器返回了意外响应: (413) Request Entity Too Large
- curl_multi_init比curl_init快30倍
- 简单记录下Java web 中的中文编码问题