转,磁盘性能监控

上一篇 / 下一篇  2017-06-09 11:56:42

对磁盘 I/O 活动的监控可通过如下几个性能计数器来度量:

 Counter Name 

Description

Avg. Disk sec/Read

Shows the average time, in seconds, of a read of data from the disk.

Avg. Disk sec/Write 

Shows the average time, in seconds, of a write of data to the disk.

Disk Transfers/sec 

Shows the rate of read and write operations on the disk.

Disk Bytes/sec

Shows the rate at which bytes are transferred to or from the disk during write or read operations.

Avg. Disk Queue Length

Shows the average number of both read and write requests that were queued for the selected disk during the sample interval. 

  • PhysicalDisk 相关的性能计数器主要针对 物理磁盘 ,如果同一物理磁盘上有多个分区,则该计数器计算的是所有分区的和。
  • LogicalDisk 相关的性能计数器主要针对 逻辑分区 ,通过挂载点或磁盘驱动器号来指定,而不是监控整个磁盘。

其中, Avg. Disk sec/Read 和  Avg. Disk sec/Write 是两个主要考量磁盘 I/O 性能的计数器,它们不需要额外的信息作为参考,可以直接判断 I/O 请求的平均延迟。

Avg. Disk sec/Read

描述从磁盘对数据进行一个读操作所需的平均时间(单位:秒)。

Avg. Disk Sec/Read is the average time in seconds of a read of data from the disk.

下面列出了参数值范围所代表的意义:

 Range 

少于 10 ms

很好

在 10-20 ms 之间   

还可以

在 20-50 ms 之间  

有点慢,需要注意 

大于 50 毫秒

有严重的 I/O 瓶颈    

这里列出的数字均为一般参考,对于有特殊需求的应用,对磁盘参数会有更高的要求。

Avg. Disk sec/Write

描述了从磁盘对数据进行一个写操作所需的平均时间(单位:秒)。

Avg. Disk Sec/Write is the average time in seconds of a write of data to the disk.

下面列出了参数值范围所代表的意义:

 Range 

少于 10 ms

很好

在 10-20 ms 之间   

还可以

在 20-50 ms 之间  

有点慢,需要注意 

大于 50 毫秒

有严重的 I/O 瓶颈    

实际上,参数范围含义与Avg. Disk sec/Read是类似的。

如果大多数磁盘驱动器出现比较高的延迟,则瓶颈可能出现在通信介质(Communication Medium),例如 SAN HBA、交换机、光纤、前端适配器 CPU 和缓存等。如果只有一个或少数几个驱动器出现延迟,则瓶颈通常会是磁盘组(JBOD:Just a Bunch of Disks),进一步调查则需要查看指定磁盘驱动器上的其他计数器的值。

JBOD (for "just a bunch of disks," or sometimes "just a bunch of drives") is an array of hard disks that haven't been configured according to the RAID (redundant array of independent disks) system.

Disk Transfers/sec

Disk Bytes/sec 和 Disk Transfers/sec 两个性能计数器常被用来观测 I/O 请求的规模和数量,用以判断是否是 JBOD 问题还是通信介质问题,然后通过  Avg. Disk Queue Length 计数器来判断是否是通信介质问题。

Disk Transfers/sec 实际上是由  Disk Reads/sec 和 Disk Writes/sec 两个计数器组成。

Disk Transfers/sec = Disk Reads/sec + Disk Writes/sec

通过上面的计数器的值可以判断是否驱动器没有足够的磁盘支撑,以判断在给定数量磁盘上所做的 RAID 是否合理。可以根据下表中列出的公式来计算应该使用哪种 RAID 类型。

 RAID Type 

I/Os per Disk

RAID 0

(reads + writes) / number of disks

RAID 1

[reads + (2 * writes)] / 2

RAID 5  

[reads + (4 * writes)] / number of disks 

RAID 10 

[reads + (2 * writes)] / number of disks    

例如:通常,一个 15000 RPM(每分钟转数,Revolutions Per Minute)的磁盘的能力大概是 180 IOPS(I/O requests per second)左右。如果Disk Transfers/sec的最大值是 1800,则有 1800/180 = 10,那么驱动器至少需要 10 个 15000 RPM 的磁盘组成 RAID 组。

如果判断延迟是由于磁盘数量问题导致,则可以考虑如下方案:

  • 使用更快的磁盘。
  • 将频繁访问的文件移动到单独的磁盘。
  • 向 RAID 阵列中添加更多的磁盘。
  • 使用更快的 RAID 类型。
  • 停止与其他卷共享磁盘。

如果判断延迟是由于传输介质问题导致,则可以考虑如下方案:

  • 将频繁访问的文件移动到单独的磁盘。
  • 验证 SAN 的高速缓存。
  • 使用多种渠道。

TAG: 监控

引用 删除 yuan_mr   /   2017-06-12 11:51:43
 

评分:0

我来说两句

日历

« 2024-03-24  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 80219
  • 日志数: 94
  • 文件数: 1
  • 建立时间: 2017-04-14
  • 更新时间: 2020-11-17

RSS订阅

Open Toolbar