虚拟机和磁盘性能Virtual machine and disk performance

本文阐述了磁盘性能,以及在将 Azure 虚拟机和 Azure 磁盘组合使用时磁盘性能的工作原理。This article helps clarify disk performance and how it works when you combine Azure Virtual Machines and Azure disks. 此外还介绍了如何诊断磁盘 IO 的瓶颈,以及可以进行哪些更改以优化性能。It also describes how you can diagnose bottlenecks for your disk IO and the changes you can make to optimize for performance.

磁盘性能工作原理How does disk performance work?

Azure 虚拟机具有每秒输入/输出操作数 (IOPS) 和吞吐量性能限制,这些限制由虚拟机类型和大小决定。Azure virtual machines have input/output operations per second (IOPS) and throughput performance limits based on the virtual machine type and size. OS 磁盘和数据磁盘可以附加到虚拟机。OS disks and data disks can be attached to virtual machines. 磁盘具有各自的 IOPS 和吞吐量限制。The disks have their own IOPS and throughput limits.

当应用程序所请求的 IOPS 或吞吐量大于为虚拟机或附加磁盘分配的 IOPS 或吞吐量时,应用程序的性能会达到上限。Your application's performance gets capped when it requests more IOPS or throughput than what is allotted for the virtual machines or attached disks. 达到上限时,应用程序的性能会降低。When capped, the application experiences suboptimal performance. 这可能会导致负面后果,例如延迟增大。This can lead to negative consequences like increased latency. 让我们通过几个示例来阐明此概念。Let's run through a couple of examples to clarify this concept. 为了使这些示例更容易理解,我们只看 IOPS。To make these examples easy to follow, we'll only look at IOPS. 但是,同样的逻辑也适用于吞吐量。But, the same logic applies to throughput.

磁盘 IO 上限Disk IO capping

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 未缓存的 IOPS:12,800Uncached IOPS: 12,800
  • E30 OS 磁盘E30 OS disk
    • IOPS:500IOPS: 500
  • 两个 E30 数据磁盘 2Two E30 data disks � 2
    • IOPS:500IOPS: 500

示意图中显示了磁盘级上限。

在虚拟机上运行的应用程序向虚拟机发出要求 10,000 个 IOPS 的请求。The application running on the virtual machine makes a request that requires 10,000 IOPs to the virtual machine. VM 允许所有这些请求,因为 Standard_D8s_v3 虚拟机最多可以执行 12,800 个 IOPS。All of which are allowed by the VM because the Standard_D8s_v3 virtual machine can execute up to 12,800 IOPs.

10,000 IOPS 的请求随后会被分解为对不同磁盘的三个不同请求:The 10,000 IOPS requests are broken down into three different requests to the different disks:

  • 向操作系统磁盘请求 1,000 IOPS。1,000 IOPS are requested to the operating system disk.
  • 向每个数据磁盘请求 4,500 IOPS。4,500 IOPS are requested to each data disk.

所有附加的磁盘都是 E30 磁盘,只能处理 500 IOPS。All attached disks are E30 disks and can only handle 500 IOPS. 因此,它们每个都以 500 IOPS 返回响应。So, they respond back with 500 IOPS each. 应用程序的性能会受到附加磁盘的限制,只能处理 1,500 IOPS。The application's performance is capped by the attached disks, and it can only process 1,500 IOPS. 如果使用性能更好的磁盘(例如,高级 SSD P30 磁盘),则应用程序的峰值性能可以达到 10,000 IOPS。The application could work at peak performance at 10,000 IOPS if better-performing disks are used, such as Premium SSD P30 disks.

虚拟机 IO 上限Virtual machine IO capping

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 未缓存的 IOPS:12,800Uncached IOPS: 12,800
  • P30 OS 磁盘P30 OS disk
    • IOPS:5,000IOPS: 5,000
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000

示意图中显示了虚拟机级上限。

在虚拟机上运行的应用程序发出需要 15,000 IOPS 的请求。The application running on the virtual machine makes a request that requires 15,000 IOPS. 遗憾的是,Standard_D8s_v3 虚拟机仅预配为处理 12,800 IOPS。Unfortunately, the Standard_D8s_v3 virtual machine is only provisioned to handle 12,800 IOPS. 应用程序受限于虚拟机限制,必须对分配给它的 12,800 IOPS 进行分配。The application is capped by the virtual machine limits and must allocate the allotted 12,800 IOPS.

请求的这 12,800 IOPS 随后会被分解为对不同磁盘的三个不同请求:Those 12,800 IOPS requested are broken down into three different requests to the different disks:

  • 向操作系统磁盘请求 4,267 IOPS。4,267 IOPS are requested to the operating system disk.
  • 向每个数据磁盘请求 4,266 IOPS。4,266 IOPS are requested to each data disk.

所有附加的磁盘都是可处理 5,000 IOPS 的 P30 磁盘。All attached disks are P30 disks that can handle 5,000 IOPS. 因此,它们将以所请求的数量返回响应。So, they respond back with their requested amounts.

虚拟机非缓存限制与缓存限制Virtual machine uncached vs cached limits

同时启用了高级存储和高级存储缓存的虚拟机有两种不同的存储带宽限制。Virtual machines that are enabled for both premium storage and premium storage caching have two different storage bandwidth limits. 让我们以 Standard_D8s_v3 虚拟机为例。Let's look at the Standard_D8s_v3 virtual machine as an example. 下面是有关 Dsv3 系列和 Standard_D8s_v3 的文档:Here is the documentation on the Dsv3-series and the Standard_D8s_v3:

图表中显示了 D s v 3 规范。Chart showing D s v 3 specifications.

  • 最大非缓存磁盘吞吐量是虚拟机能够处理的默认存储最大限制。The max uncached disk throughput is the default storage maximum limit that the virtual machine can handle.
  • 启用主机缓存时,最大 缓存 存储吞吐量限制是一个单独的限制。The max cached storage throughput limit is a separate limit when you enable host caching.

主机缓存的工作原理是,使存储更接近可以快速写入或读取的 VM。Host caching works by bringing storage closer to the VM that can be written or read to quickly. 文档中介绍了可供 VM 用于主机缓存的存储量。The amount of storage that is available to the VM for host caching is in the documentation. 例如,可以看到 Standard_D8s_v3 带有 200 GiB 的缓存存储。For example, you can see the Standard_D8s_v3 comes with 200 GiB of cache storage.

你可以在创建虚拟机并附加磁盘时启用主机缓存。You can enable host caching when you create your virtual machine and attach disks. 还可以在现有 VM 的磁盘上打开和关闭主机缓存。You can also turn on and off host caching on your disks on an existing VM.

屏幕截图显示了主机缓存。

你可以调整主机缓存来满足每个磁盘的工作负荷要求。You can adjust the host caching to match your workload requirements for each disk. 可以将主机缓存设置为:You can set your host caching to be:

  • 只读:适用于仅执行读取操作的工作负荷Read-only: For workloads that only do read operations
  • 读取/写入:适用于执行均衡的读取和写入操作的工作负荷Read/write: For workloads that do a balance of read and write operations

如果你的工作负载不符合上述任一模式,建议不要使用主机缓存。If your workload doesn't follow either of these patterns, we don't recommend that you use host caching.

让我们通过几个示例来了解不同的主机缓存设置,看其如何影响数据流和性能。Let's run through a couple examples of different host cache settings to see how it affects the data flow and performance. 在这第一个示例中,我们将了解当主机缓存设置设为“只读”时,IO 请求会发生什么。In this first example, we'll look at what happens with IO requests when the host caching setting is set to Read-only.

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 缓存的 IOPS:16,000Cached IOPS: 16,000
    • 非缓存 IOPS:12,800Uncached IOPS: 12,800
  • P30 数据磁盘P30 data disk
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:只读Host caching: Read-only

当执行读取操作且所需数据在缓存上可用时,缓存会返回所请求的数据。When a read is performed and the desired data is available on the cache, the cache returns the requested data. 不需要从磁盘读取数据。There is no need to read from the disk. 此读取会计入 VM 的缓存限制。This read is counted toward the VM's cached limits.

示意图中显示了读取主机缓存读取命中。

当执行读取操作且所需数据在缓存上不可用时,读取请求会被中继到磁盘。When a read is performed and the desired data is not available on the cache, the read request is relayed to the disk. 然后,磁盘将数据提供给缓存和 VM。Then the disk surfaces it to both the cache and the VM. 此读取操作会同时计入 VM 的非缓存限制和 VM 的缓存限制。This read is counted toward both the VM's uncached limit and the VM's cached limit.

示意图中显示了读取主机缓存读取未命中。

执行写入操作时,必须同时写入缓存和磁盘,然后才能将其视为已完成。When a write is performed, the write has to be written to both the cache and the disk before it is considered complete. 此写入操作会同时计入 VM 的非缓存限制和 VM 的缓存限制。This write is counted toward the VM's uncached limit and the VM's cached limit.

示意图中显示了读取主机缓存写入。

接下来,我们将了解当主机缓存设置设为“读取/写入”时,IO 请求会发生什么。Next let's look at what happens with IO requests when the host cache setting is set to Read/write.

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 缓存的 IOPS:16,000Cached IOPS: 16,000
    • 非缓存 IOPS:12,800Uncached IOPS: 12,800
  • P30 数据磁盘P30 data disk
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write

读取的处理方式与只读完全相同。A read is handled the same way as a read-only. 对于读取/写入缓存,只有写入存在差别。Writes are the only thing that's different with read/write caching. 在主机缓存设置为“读取/写入”的情况下进行写入时,只需要写入主机缓存即可将其视为完成。When writing with host caching is set to Read/write, the write only needs to be written to the host cache to be considered complete. 然后,将该写入操作作为后台进程延迟写入磁盘。The write is then lazily written to the disk as a background process. 这意味着当写入到缓存时,该写入计入缓存的 IO。This means that a write is counted toward cached IO when it is written to the cache. 如果它被延迟写入到磁盘,则会计入未缓存的 IO。When it is lazily written to the disk, it counts toward the uncached IO.

示意图中显示了读取/写入主机缓存写入。

接下来,让我们继续讨论 Standard_D8s_v3 虚拟机。Let�s continue with our Standard_D8s_v3 virtual machine. 但是,这次我们会在磁盘上启用主机缓存。Except this time, we'll enable host caching on the disks. 另外,现在 VM 的 IOPS 限制为 16,000 IOPS。Also, now the VM's IOPS limit is 16,000 IOPS. 附加到 VM 的三个基础 P30 磁盘每个可处理 5,000 IOPS。Attached to the VM are three underlying P30 disks that can each handle 5,000 IOPS.

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 缓存的 IOPS:16,000Cached IOPS: 16,000
    • 非缓存 IOPS:12,800Uncached IOPS: 12,800
  • P30 OS 磁盘P30 OS disk
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write

示意图中显示了主机缓存示例。

应用程序使用了已启用缓存的 Standard_D8s_v3 虚拟机。The application uses a Standard_D8s_v3 virtual machine with caching enabled. 它发出了 15000 IOPS 的请求。It makes a request for 15,000 IOPS. 这些请求将分解为每个附加的基础磁盘 5,000 IOPS。The requests are broken down as 5,000 IOPS to each underlying disk attached. 不会达到性能上限。No performance capping occurs.

组合的非缓存和缓存限制Combined uncached and cached limits

虚拟机的缓存限制独立于其非缓存限制。A virtual machine's cached limits are separate from its uncached limits. 这意味着,你可以在附加到 VM 的磁盘上启用主机缓存,同时不在其他磁盘上启用主机缓存。This means you can enable host caching on disks attached to a VM while not enabling host caching on other disks. 此配置使得虚拟机获得的总存储 IO 为缓存限制外加非缓存限制。This configuration allows your virtual machines to get a total storage IO of the cached limit plus the uncached limit.

让我们通过一个示例来帮助你了解这些限制如何协同工作。Let's run through an example to help you understand how these limits work together. 我们将继续讨论 Standard_D8s_v3 虚拟机和附加了高级磁盘的配置。We'll continue with the Standard_D8s_v3 virtual machine and premium disks attached configuration.

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 缓存的 IOPS:16,000Cached IOPS: 16,000
    • 非缓存 IOPS:12,800Uncached IOPS: 12,800
  • P30 OS 磁盘P30 OS disk
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:已禁用Host caching: Disabled

示意图中显示了具有远程存储的主机缓存示例。

在此示例中,在 Standard_D8s_v3 虚拟机上运行的应用程序发出了 25,000 IOPS 的请求。In this case, the application running on a Standard_D8s_v3 virtual machine makes a request for 25,000 IOPS. 该请求将分解为每个附加的磁盘 5,000 IOPS。The request is broken down as 5,000 IOPS to each of the attached disks. 三个磁盘使用主机缓存,两个磁盘未使用主机缓存。Three disks use host caching and two disks don't use host caching.

  • 由于使用主机缓存的三个磁盘在缓存限制 (16,000) 内,因此这些请求会成功完成。Since the three disks that use host caching are within the cached limits of 16,000, those requests are successfully completed. 不会达到存储性能上限。No storage performance capping occurs.
  • 由于未使用主机缓存的两个磁盘在非缓存限制 (12,800) 内,因此这些请求也会成功完成。Since the two disks that don't use host caching are within the uncached limits of 12,800, those requests are also successfully completed. 不会达到上限。No capping occurs.

磁盘性能指标Disk performance metrics

我们在 Azure 上提供了一些指标,可以通过它们了解虚拟机和磁盘的性能。We have metrics on Azure that provide insight on how your virtual machines and disks are performing. 可以通过 Azure 门户查看这些指标。These metrics can be viewed through the Azure portal. 还可以通过 API 调用来检索它们。They can also be retrieved through an API call. 指标按一分钟间隔进行计算。Metrics are calculated over one-minute intervals. 以下指标可用于深入了解 VM 和磁盘 IO 及吞吐量性能:The following metrics are available to get insight on VM and Disk IO, and also on throughput performance:

  • OS 磁盘队列深度:当前未完成的等待在 OS 磁盘中读取或写入的 IO 请求数。OS Disk Queue Depth: The number of current outstanding IO requests that are waiting to be read from or written to the OS disk.
  • OS 磁盘读取字节数/秒:每秒从 OS 磁盘中读取的字节数。OS Disk Read Bytes/Sec: The number of bytes that are read in a second from the OS disk.
  • OS 磁盘读取操作次数/秒:每秒从 OS 磁盘读取的输入操作的次数。OS Disk Read Operations/Sec: The number of input operations that are read in a second from the OS disk.
  • OS 磁盘写入字节数/秒:每秒在 OS 磁盘中写入的字节数。OS Disk Write Bytes/Sec: The number of bytes that are written in a second from the OS disk.
  • OS 磁盘写入操作次数/秒:每秒在 OS 磁盘中写入的输出操作的次数。OS Disk Write Operations/Sec: The number of output operations that are written in a second from the OS disk.
  • 数据磁盘队列深度:当前未完成的等待在数据磁盘中读取或写入的 IO 请求数。Data Disk Queue Depth: The number of current outstanding IO requests that are waiting to be read from or written to the data disk(s).
  • 数据磁盘读取字节数/秒:每秒从数据磁盘中读取的字节数。Data Disk Read Bytes/Sec: The number of bytes that are read in a second from the data disk(s).
  • 数据磁盘读取操作次数/秒:每秒从数据磁盘读取的输入操作的次数。Data Disk Read Operations/Sec: The number of input operations that are read in a second from data disk(s).
  • 数据磁盘写入字节数/秒:每秒在数据磁盘中写入的字节数。Data Disk Write Bytes/Sec: The number of bytes that are written in a second from the data disk(s).
  • 数据磁盘写入操作次数/秒:每秒在数据磁盘中写入的输出操作的次数。Data Disk Write Operations/Sec: The number of output operations that are written in a second from data disk(s).
  • 磁盘读取字节数/秒:每秒从附加到某个 VM 的所有磁盘中读取的总字节数。Disk Read Bytes/Sec: The number of total bytes that are read in a second from all disks attached to a VM.
  • 磁盘读取操作次数/秒:每秒从附加到某个 VM 的所有磁盘中读取的输入操作的次数。Disk Read Operations/Sec: The number of input operations that are read in a second from all disks attached to a VM.
  • 磁盘写入字节数/秒:每秒在附加到某个 VM 的所有磁盘中写入的字节数。Disk Write Bytes/Sec: The number of bytes that are written in a second from all disks attached to a VM.
  • 磁盘写入操作次数/秒:每秒在附加到某个 VM 的所有磁盘中写入的输出操作的次数。Disk Write Operations/Sec: The number of output operations that are written in a second from all disks attached to a VM.

存储 IO 利用率指标Storage IO utilization metrics

有助于诊断磁盘 IO 上限的指标:Metrics that help diagnose disk IO capping:

  • 已使用的数据磁盘 IOPS 的百分比:通过将完成的数据磁盘 IOPS 与预配的数据磁盘 IOPS 相比计算得出的百分比。Data Disk IOPS Consumed Percentage: The percentage calculated by the data disk IOPS completed over the provisioned data disk IOPS. 如果此数为 100%,则表明正在运行的应用程序达到你的数据磁盘 IOPS 限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your data disk's IOPS limit.
  • 已使用的数据磁盘带宽百分比:通过将完成的数据磁盘吞吐量与预配的数据磁盘吞吐量相比计算得出的百分比。Data Disk Bandwidth Consumed Percentage: The percentage calculated by the data disk throughput completed over the provisioned data disk throughput. 如果此数为 100%,则表明正在运行的应用程序达到你的数据磁盘带宽限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your data disk's bandwidth limit.
  • 已使用的 OS 磁盘 IOPS 的百分比:通过将完成的 OS 磁盘 IOPS 与预配的 OS 磁盘 IOPS 相比计算得出的百分比。OS Disk IOPS Consumed Percentage: The percentage calculated by the OS disk IOPS completed over the provisioned OS disk IOPS. 如果此数为 100%,则表明正在运行的应用程序达到你的 OS 磁盘 IOPS 限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your OS disk's IOPS limit.
  • 已使用的 OS 磁盘带宽百分比:通过将完成的 OS 磁盘吞吐量与预配的 OS 磁盘吞吐量相比计算得出的百分比。OS Disk Bandwidth Consumed Percentage: The percentage calculated by the OS disk throughput completed over the provisioned OS disk throughput. 如果此数为 100%,则表明正在运行的应用程序达到你的 OS 磁盘带宽限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your OS disk's bandwidth limit.

有助于诊断 VM IO 上限的指标:Metrics that help diagnose VM IO capping:

  • 已使用的 VM 缓存 IOPS 的百分比:通过将完成的总 IOPS 与最大缓存虚拟机 IOPS 限制相比计算得出的百分比。VM Cached IOPS Consumed Percentage: The percentage calculated by the total IOPS completed over the max cached virtual machine IOPS limit. 如果此数为 100%,则表明正在运行的应用程序达到你的 VM 缓存 IOPS 限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your VM's cached IOPS limit.
  • 已使用的 VM 缓存带宽百分比:通过将完成的总磁盘吞吐量与最大缓存虚拟机吞吐量相比计算得出的百分比。VM Cached Bandwidth Consumed Percentage: The percentage calculated by the total disk throughput completed over the max cached virtual machine throughput. 如果此数为 100%,则表明正在运行的应用程序达到你的 VM 缓存带宽限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your VM's cached bandwidth limit.
  • 已使用的 VM 未缓存 IOPS 的百分比:通过将虚拟机上完成的总 IOPS 与最大非缓存虚拟机 IOPS 限制相比计算得出的百分比。VM uncached IOPS Consumed Percentage: The percentage calculated by the total IOPS on a virtual machine completed over the max uncached virtual machine IOPS limit. 如果此数为 100%,则表明正在运行的应用程序达到你的 VM 非缓存 IOPS 限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your VM's uncached IOPS limit.
  • 已使用的 VM 非缓存带宽百分比:通过将虚拟机上完成的总磁盘吞吐量与最大预配虚拟机吞吐量相比计算得出的百分比。VM Uncached Bandwidth Consumed Percentage: The percentage calculated by the total disk throughput on a virtual machine completed over the max provisioned virtual machine throughput. 如果此数为 100%,则表明正在运行的应用程序达到你的 VM 非缓存带宽限制的 IO 上限。If this amount is at 100%, your application running is IO capped from your VM's uncached bandwidth limit.

存储 IO 利用率指标示例Storage IO utilization metrics example

让我们通过一个示例来了解如何使用这些新的存储 IO 利用率指标来帮助我们调试系统中的瓶颈。Let's run through an example of how to use these new Storage IO utilization metrics to help us debug where a bottleneck is in our system. 系统设置与前面的示例相同,但是,这次附加的 OS 磁盘不缓存。The system setup is the same as the previous example, except this time the attached OS disk is not cached.

设置:Setup:

  • Standard_D8s_v3Standard_D8s_v3
    • 缓存的 IOPS:16,000Cached IOPS: 16,000
    • 非缓存 IOPS:12,800Uncached IOPS: 12,800
  • P30 OS 磁盘P30 OS disk
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:已禁用Host caching: Disabled
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host caching: Read/write
  • 两个 P30 数据磁盘 2Two P30 data disks � 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:已禁用Host caching: Disabled

让我们对可创建 IO 活动的此虚拟机和磁盘组合运行基准测试。Let's run a benchmarking test on this virtual machine and disk combination that creates IO activity. 若要了解如何在 Azure 上对存储 IO 进行基准测试,请参阅在 Azure 磁盘存储上对应用程序进行基准测试To learn how to benchmark storage IO on Azure, see Benchmark your application on Azure Disk Storage. 通过基准测试工具,可以看到 VM 和磁盘组合可以实现 22,800 个 IOPS:From the benchmarking tool, you can see that the VM and disk combination can achieve 22,800 IOPS:

突出显示了 r=22.8k 的 f i o 输出屏幕截图。Screenshot of f i o output showing r=22.8k highlighted.

Standard_D8s_v3 最多可以达到 28,600 个 IOPS。The Standard_D8s_v3 can achieve a total of 28,600 IOPS. 让我们使用这些指标,调查正在进行的操作,并确定存储 IO 瓶颈。Using the metrics, let's investigate what's going on and identify our storage IO bottleneck. 在左侧窗格中,选择“指标”:On the left pane, select Metrics:

左侧窗格中突出显示了“指标”的屏幕截图。

我们先看一下 已使用的 VM 缓存 IOPS 的百分比 指标:Let's first take a look at our VM Cached IOPS Consumed Percentage metric:

显示“已使用的 VM 缓存 IOPS 的百分比”的屏幕截图。

此指标告诉我们,在 VM 上分配给缓存 IOPS 的 16,000 IOPS 中,使用了 61%。This metric tells us that 61% of the 16,000 IOPS allotted to the cached IOPS on the VM is being used. 此百分比意味着存储 IO 瓶颈与缓存的磁盘无关,因为该指标值没有达到 100%。This percentage means that the storage IO bottleneck isn't with the disks that are cached because it isn't at 100%. 我们现在来看一下“已使用的 VM 未缓存 IOPS 的百分比”指标:Now let's look at our VM Uncached IOPS Consumed Percentage metric:

显示“已使用的 VM 未缓存 IOPS 的百分比”的屏幕截图。

此指标为 100%。This metric is at 100%. 此指标告诉我们,在 VM 上分配给未缓存 IOPS 的所有 12,800 IOPS 均已使用。It tells us that all of the 12,800 IOPS allotted to the uncached IOPS on the VM are being used. 可以修正此问题的一种方法是,将 VM 大小更改为可处理更多 IO 的更大的大小。One way we can remediate this issue is to change the size of our VM to a larger size that can handle the additional IO. 但在执行此操作之前,我们先来看一下附加的磁盘,以了解这些磁盘发生了多少 IOPS。But before we do that, let's look at the attached disk to find out how many IOPS they are seeing. 通过查看“已使用的 OS 磁盘 IOPS 的百分比”来看一下 OS 磁盘:Check the OS Disk by looking at the OS Disk IOPS Consumed Percentage:

显示“已使用的 OS 磁盘 IOPS 的百分比”的屏幕截图。

此指标告诉我们,在为此 P30 OS 磁盘预配的 5,000 IOPS 中,使用了大约 90%。This metric tells us that around 90% of the 5,000 IOPS provisioned for this P30 OS disk is being used. 此百分比意味着 OS 磁盘上没有瓶颈。This percentage means there's no bottleneck at the OS Disk. 现在我们通过查看 已使用的数据磁盘 IOPS 的百分比 来看一下附加到 VM 的数据磁盘:Now let's check the data disks that are attached to the VM by looking at the Data Disk IOPS Consumed Percentage:

显示“已使用的数据磁盘 IOPS 的百分比”的屏幕截图。

此指标告诉我们,在所有附加的磁盘上,平均已使用的 IOPS 百分比约为 42%。This metric tells us that the average IOPS consumed percentage across all the disks attached is around 42%. 此百分比是根据由这些磁盘使用且未从主机缓存中予以服务的 IOPS 计算得出的。This percentage is calculated based on the IOPS that are used by the disks, and that aren't being served from the host cache. 让我们通过对这些指标应用拆分并按 LUN 值拆分来深入了解此指标:Let's drill deeper into this metric by applying splitting on these metrics and splitting by the LUN value:

显示拆分后“已使用的数据磁盘 IOPS 的百分比”的屏幕截图。

此指标告诉我们,LUN 3 和 2 上附加的数据磁盘使用了它们约 85% 的预配 IOPS。This metric tells us the data disks attached on LUN 3 and 2 are using around 85% of their provisioned IOPS. 下面是 VM 和磁盘体系结构中 IO 情况的示意图:Here is a diagram of what the IO looks like from the VM and disks architecture:

存储 IO 指标示例的示意图。