ABAP管理和性能分析中用到的重要分析工具概述
2016-05-31 18:54
429 查看
概括的总结一下BC490的第一章内容:Architecture
and Technical Overview(ABAP管理和性能分析中用到的重要分析工具),细节参加BC490教材。
由上图可知,优化程序性能时,关键是优化数据库访问。当然程序逻辑(缓存、内表etc)也很重要。
下面将从两个方面介绍常用的性能检测方法
The SAP system
The Database system
SAP系统的三层架构中,Presentation和Application层都可以扩展。而Database层作为centraldata
repository是不可扩展的。
ABAP性能分析的两个重要方向:降低程序在应用服务器上的运行时间、降低数据库负载。后者较为重要。
数据在展示层和应用层之间的传输,按照2~10kb的模块进行。在应用层和数据库中之间传输是严格的32kb的大小。
当然还有其他附加的层(如ITS,ICM等),但是与ABAP开发不相关,不做讨论。
如果想查看系统使用何种数据库、操作系统、系统版本等信息,可以查看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).
Dialog和Transactionstep都记录在了系统了(静态的记录),可以只用STAD命令查看。
在分析时,注意限定查询条件,以满足特定的查询需求。
双击上图中相应的记录,可查看如下图所示的详细内容。同时还可以查看DB time、Loadtime和
CPU time等。也可以分析DB、RFC访问。
为了查看系统中最大负载的程序,可以使用负载分析,详细的分析性能问题。
详情界面
注意两个比率:CPU和DB应该不大于相应时间的40%。
by monitoring thephysical I/O(read and writeaccess to database files),
memoryconsumption, CPU consumption,and
networkcommunication.
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时,则亟待分析。注意系统需要运行较长时间后(几天),才进行性能分析。
查找结果(注意过滤条件)
更多分析,日后根据需求进行分析。
注意区分各种类型的语句。
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,and
networkcommunication.
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
相关文章推荐
- mysqlsla慢查询分析工具使用笔记
- php性能优化分析工具XDebug 大型网站调试工具
- 整理硬盘发现几个以前做的视频,分享下
- JDK自带VM分析工具jps,jstat,jmap,jconsole
- 朗泽SAP:SAP在中国已进入高速时代
- seletc-options:当输入的数据量过多时 SQL语句dump
- 程序效率相关小技巧(除去很多共知的)
- SAP ABAP SQL 自动查询工具
- SAP系统直接查询物流、快递跟踪信息
- SAP ECC 主数据自动切换、刷新方案
- SAP RFC
- SAP各模块常用BAPI
- ABAP 内表用法小结
- SAP中日期时间函数收集
- ABAP调用外部WebService
- User client windows logon basic data
- ABAP 字段查找
- SM36 定义后台作业之日期变量
- 简化ABAP SQL语句
- ALV DataChange 事件