Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 利用工具分析 IBM i 程序性能 应锦鑫, IBM i 性能工具高级软件工程师 IBM 中国系统与科技研发中心.

Similar presentations


Presentation on theme: "© 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 利用工具分析 IBM i 程序性能 应锦鑫, IBM i 性能工具高级软件工程师 IBM 中国系统与科技研发中心."— Presentation transcript:

1 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 利用工具分析 IBM i 程序性能 应锦鑫, IBM i 性能工具高级软件工程师 IBM 中国系统与科技研发中心

2 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 2 议程  准备知识  IBM i 性能工具介绍  收集服务 (Collection Service) 性能数据分析  作业观察器 (Job Watcher) 性能数据分析  磁盘观察器 (Disk Watcher) 性能数据分析  性能探测器 (Performance Explorer, PEX) 性能数据分析

3 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 3 准备知识

4 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业时间  作业的时间分布 – 分派的 CPU 时间 –CPU 排队时间 – 等待时间 CPU CPU 排队等待空闲 作业时间 交互式作业运行 / 等待时间 典型的批处理作业运行 / 等待时间 CPU CPU 排队等待 作业时间 4

5 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 基本概念 - 等待  等待的基本类型 – 空闲 : 作业处于空闲状态,等待任务请求 – 阻塞型等待 : 发生在作业的处理任务的过程中的等待  作业等待时间计算 批处理作业 : 等待时间 = 作业时间 – CPU 时间 交互式作业 : 等待时间 = 作业时间 – CPU 时间 – 空闲时间 5

6 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 简单的例子 批处理作业( 6 小时) CPU 120 分钟 CPU 队列 60 分钟 等待 180 分钟 作业时间 6 小时 (360 分钟 )‏ 运行 / 等待时间 6

7 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 等待时间分析 作业等待的具体分布时间 CPU CPU 队列等待 作业时间 磁盘读磁盘写记录锁日志 7

8 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业等待具体统计 详细的等待时间  至此,我们可以开始着手考虑以下问题来进行优化: – 多少磁盘读操作是由于页面错误导致的?内存池改变是否有助于减少磁盘读时间? – 哪个程序导致这些磁盘读操作?这些读操作是否能减少或改为异步方式? – 哪个程序导致这些磁盘写操作?这些写操作是否能减少或改为异步方式? – 那些 DB2 文件涉及了记录锁? – 那些文件做了日志? 这些日志是否需要或者优化配置? 磁盘读 3,523 42 秒 0.012 秒 磁盘写 17,772 73 秒 0.004 秒 记录锁 355 45 秒 0.126 秒 日志 5,741 44 秒 0.007 秒 总次数 总时间 平均时间 8

9 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 IBM i 6.1/7.1 定义的 30 个等待桶( Wait Buckets) –CPU 调度( Dispatched CPU ) –CPU 排队( CPU queuing ) – 其他等待( Other waits ) – 磁盘缺页故障( Disk page faults ) – 磁盘非故障读取( Disk non fault reads ) – 磁盘空间争用( Disk space usage contention ) – 磁盘 op-start 争用( Disk op-start contention ) – 磁盘写入( Disk writes ) – 磁盘其他( Disk other ) – 日志( Journaling ) – 信号争用( Semaphore contention ) – 互斥争用( Mutex contention ) – 机器级别门串行化( Machine level gate serialization ) – 占用争用( Seize contention ) – 数据库纪录锁定争用( Database record lock contention ) – 对象锁定争用( Object lock contention ) – 不合格等待( Ineligible waits ) – 主存储池过量使用( Main storage pool overcommitment ) – 经典 Java 用户(包括锁定)( Classic Java user including locks ) – 经典 JVM (Classic JVM) – 经典 Java 其他 (Classic Java other) – 套接字传输( Socket transmits ) – 套接字接收( Socket receives ) – 套接字其他( Socket other ) –IFS –PASE – 数据队列接收( Data queue receives ) – 空闲 / 等待工作( Idle / waiting for work ) – 同步令牌争用( Synchronization Token contention ) – 异常争用( Abnormal contention ) 详细的解释请参照: https://www- 912.ibm.com/i_dir/idoctor.nsf/3B3C112F7FBE774C86256F4000757A8F/$FILE/Job_Wait s_White_Paper_61_71.pdf https://www- 912.ibm.com/i_dir/idoctor.nsf/3B3C112F7FBE774C86256F4000757A8F/$FILE/Job_Wait s_White_Paper_61_71.pdf 9

10 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 10 IBM i 性能工具介绍

11 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 IBM i 性能工具  性能数据收集器 (Collector) 用于收集系统中各种资源的性能数据,并将这些数据保存在数据库中以便性能分 析工具进一步分析。  性能数据分析工具 对各类收集器收集的性能数据进行分析,并以报表或图表的方式展现给用户。 11

12 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 性能数据收集器 (Collector)  收集服务( Collection Services )  作业观察器( Job Watcher )  磁盘观察器( Disk Watcher )  性能探测器( Performance Explorer ) 12

13 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 性能数据收集器 (Collector) 13

14 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 IBM i 性能数据分析工具 14

15 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 Performance Data Investigator (PDI)  Performance Data Investigator (PDI) 是 集成于 IBM Systems Director Navigator for i 的一个基于 Web 的图形用户界面性能分析工具,可帮助分析来自不同收集 器的数据,包括: – 收集服务( Collection Services ) – 作业观察器( Job Watcher ) – 磁盘观察器( Disk Watcher ) – 性能探测器( Performance Explorer )(部分支持) 15

16 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 使用 PDI (IBM Systems Director Navigator for i) 16

17 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 iDoctor  iDoctor 是一个 Windows 客户端性能分析工具,完全支持 IBM i 不同收集器的数据 分析,包括: – 收集服务( Collection Services ) – 作业观察器( Job Watcher ) – 磁盘观察器( Disk Watcher ) – 性能探测器( Performance Explorer ) 17

18 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 收集服务性能数据分析 18

19 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 收集服务 (Collection Services)  收集服务收集器拥有最小的开销,旨在全天候的收集系统基本性能数据。 – 自动的 7x24 性能数据收集 – 采用独有的专利技术,系统资源消耗非常低 – 定时收集数据 (15 秒 到 1 小时可配 ) – 收集系统资源的基本性能数据 – 数据存于 *MGTCOL 系统对象中,并且 ( 通常 ) 同时存到性能数据库文件中 19

20 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 收集服务配置 通过显示所有性能任务按钮,我们可以进入到收集器配置控制页面,在该页面我们可以 控制配置收集服务、作业观察器及磁盘观察器 在收集服务的下拉菜单我们可以起 停及配置收集服务 20

21 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 收集服务性能数据分析 21

22 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 例一 22

23 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 显示工具提示 这个图表描绘的是 CPU 使用率的系统概括信息和比较 常见的等待情况。 使用工具箱中的 “ 显示提示工具 ” , 移动工具到图表上的 各种区域,可以看到该点的数据信息。 23

24 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 24

25 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 从 “ 选择操作中 ” 选择 ” 按作业或任务分类等待 ”, 来查看是 什么作业造成造成机器级别门串行化竞争。 25

26 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 我们可以识别出作业 QSQSRVR 是占用机器级别门串行化时间 最多的作业 用 ” 按线程或任务分类的所有等待 ” 进一步分析该任务的各个线 程的等待时间 26

27 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 我们可以识别出作业 QSQSRVR 有 4 个线程在运行, 占用了绝 大多数的机器级别门串行化时间。然而,收集服务无法告诉我 们更多的信息。要想具体理解 “ 机器级别门串行化 ” 需要查看作 业观察器数据,它包含更多关于资源占用和调用栈信息 27

28 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业观察器性能数据分析 28

29 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业观察器  作业观察器性能数据收集器旨在收集更详细的作业性能数据以进行诊断。 Job Watcher 与 Collection Services 收集的数据大致相同,但收集的信息更详细,比 如调用栈和 SQL 语句。 – 基于时间间隔的性能数据收集器 – 最小时间间隔为 0.1 秒。 – 需要创建作业观察器定义。 29

30 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业观察器配置 通过显示所有性能任务按钮,我们可以进入到收集器配置控制页面,在该页面我们可以 控制配置收集服务、作业观察器及磁盘观察器 在作业观察器的下拉菜单我们可以 起停及定义作业观察器 30

31 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 作业观察器性能数据分析 31

32 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 例子 : 使用作业观察器分析机器级别的门串 行化的等待时间 32

33 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 33

34 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 寻找异常的的图表片段来作为开始调查的一种方式。 把某个时间窗口里图表放大来做进一步的调查分析。 34

35 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 通过图表的局部放大, 发现在 CPU 利用率急剧下降的时间段里,操作系 统争用时间 ” 成为导致等待的重要因素。 利用工具提示来查看操作系统竞争时间的具体信息。 35

36 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 36

37 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 37

38 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 通过 ” 选择操作 ” 下拉列表选择 “ 按机器级别门串行化排序的 线程或任务的所有等待 “ 视图来进一步的获取信息。 38

39 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 通过 ” 选择操作 ” 下拉列表选择 “ 一个线程或任务的所有等待 ” 视图来进一步的获取信息。 39

40 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 40

41 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 41

42 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 磁盘观察器性能数据分析 42

43 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 磁盘观察器 (Disk Watcher)  磁盘观察器旨在收集磁盘操作的详细性能数据。磁盘观察器数据对于分析和优化 应用程序 I/O 会很有用。 – 收集详细的磁盘数据 - 磁盘级别 – 基于间隔时间统计和基于系统事件跟踪。 43

44 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 磁盘观察器配置 通过显示所有性能任务按钮,我们可以进入到收集器配置控制页面,在该页面我们可以 控制配置收集服务、作业观察器及磁盘观察器 在磁盘观察器的下拉菜单我们可以 起停及定义磁盘观察器 44

45 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 磁盘观察器性能数据分析 45

46 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 例子 : 磁盘观察器数据分析 46

47 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 47

48 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 此图表显示整个收集过程的每个时间间隔的平均响应时 间和每秒总 I/O 。 48

49 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 49

50 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 50 通过 ” 选择操作 “ 下拉列表, 选择 “ 按磁盘机分类的磁盘统 计详细信息 ” 视图。

51 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 51

52 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 52

53 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 性能探测器数据分析 53

54 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 性能探测器 (Performance Explorer)  性能探测器收集指定程序更加详尽的信息, 能深入地分析特定的性能问题。 – 能从更底层的层次确定性能问题的根本原因。 – 收集的系统及用户的软件的性能数据。 – 基于系统事件消息收集性能数据。 54 红皮书: Application and Program Performance Analysis Using PEX Statistics on IBM i5/OS ( http://www.redbooks.ibm.com/abstracts/sg247457.html )http://www.redbooks.ibm.com/abstracts/sg247457.html

55 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 iDoctor PEX Analyzer 55

56 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 性能探测器配置 56

57 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 函数 / 指令统计信息 57

58 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 函数 / 指令调用信息 58

59 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 函数 / 指令调用信息 59

60 © 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 60


Download ppt "© 2012 IBM Corporation IBM 中国系统与科技研发中心 --- IBM i 实验室之旅 利用工具分析 IBM i 程序性能 应锦鑫, IBM i 性能工具高级软件工程师 IBM 中国系统与科技研发中心."

Similar presentations


Ads by Google