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

本文介绍了磁盘性能,以及在将 Azure 虚拟机和 Azure 磁盘组合使用时磁盘性能的工作原理。This article helps clarify disk performance and how it works with 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 IOPS and throughput performance limits based on the virtual machine type and size. 可附加到虚拟机的 OS 磁盘和数据磁盘具有自己的 IOPS 和吞吐量限制。OS Disks and Data disks, which can be attached to virtual machines, have their own IOPs and throughput limits. 虚拟机上运行的应用程序所请求的 IOPS 或吞吐量大于为虚拟机或附加磁盘分配的 IOPS 或吞吐量时,应用程序的性能将受到限制。When your application running on your virtual machines requests more IOPS or throughput than what is allotted for the virtual machine or the attached disks, your application's performance gets capped. 发生这种情况时,应用程序将性能欠佳,并可能导致延迟时间增加等负面后果。When this happens, the application will experience suboptimal performance and can lead to some negative consequences like increased latency. 让我们浏览几个示例来巩固这些知识。Let's run through a couple of examples to solidify this. 为了使这些示例易于理解,我们只讨论 IOPS,但同样的逻辑也适用于吞吐量。To make these examples easy to follow, we'll only look at IOPs but the same logic applies to throughput as well.

磁盘 IO 上限Disk IO capping

设置:Set up:

  • Standard_D8s_v3Standard_D8s_v3
    • 未缓存的 IOPS:12,800Uncached IOPS: 12,800
  • E30 OS 磁盘E30 OS Disk
    • IOPS:500IOPS: 500
  • 2 个 E30 数据磁盘2 E30 Data Disks
    • 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 的请求随后会被分解为对不同磁盘的三个不同请求。Those 10,000 IOPs requests are then broken down into three different requests to the different disks. 向操作系统磁盘请求 1,000 个 IOPS,向每个数据磁盘请求 4,500 个 IOPS。1,000 IOPs are requested to the operating system disk and 4,500 IOPs are requested to each data disk. 由于所有附加的磁盘都是 E30 磁盘,只能处理 500 个 IOPS,因此这些磁盘每个都以 500 个 IOPS 的速度响应。Since all disks attached are E30 disks and can only handle 500 IOPs, they respond back with 500 IOPs each. 应用程序的性能因此会受到附加磁盘的限制,只能处理 1,500 个 IOPS。The application's performance is then capped by the attached disks and can only process 1,500 IOPs. 如果使用性能更好的磁盘(例如,高级 SSD P30 磁盘),则峰值性能可以达到 10,000 个 IOPS。It could be working at peak performance at 10,000 IOPS if better performing disks were used, like Premium SSD P30 disks.

虚拟机 IO 上限Virtual machine IO capping

设置:Set up:

  • Standard_D8s_v3Standard_D8s_v3
    • 未缓存的 IOPS:12,800Uncached IOPS: 12,800
  • P30 OS 磁盘P30 OS Disk
    • IOPS:5,000IOPS: 5,000
  • 2 个 P30 数据磁盘2 P30 Data Disks
    • 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 进行分配。From this, The application is capped by the virtual machine limits and must then allocate the allotted 12,800 IOPs. 这些要求 12,800 个 IOPS 的请求随后会被分解为对不同磁盘的三个不同请求。Those 12,800 IOPs requested are then broken down into three different requests to the different disks. 向操作系统磁盘请求 4,267 个 IOPS,向每个数据磁盘请求 4,266 个 IOPS。4,267 IOPs are requested to the operating system disk and 4,266 IOPs are requested to each data disk. 由于附加的所有磁盘都是 P30 磁盘(可以处理 5,000 个 IOPS),因此它们会以请求的数量进行响应。Since all disks attached are P30 disks, which can handle 5,000 IOPs, they respond back with their requested amounts.

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

同时启用了高级存储和高级存储缓存的虚拟机有两种不同的存储带宽限制。Virtual machines that are both premium storage enabled and premium storage caching enabled have two different storage bandwidth limits. 接下来,让我们继续查看 Standard_D8s_v3 虚拟机的示例。Let's continue with looking at the Standard_D8s_v3 virtual machine as an example. 下面是有关 Dsv3 系列及其中的 Standard_D8s_v3 的文档:Here is the documentation on the Dsv3-series and on it the Standard_D8s_v3:

Dsv3 文档

最大 非缓存 磁盘吞吐量是虚拟机能够处理的默认存储最大限制。The max uncached disk throughput is the default storage maximum limit that the virtual machine is able to 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.

创建虚拟机并附加磁盘时,可以启用主机缓存。Enabling host caching can be done when creating your virtual machine and attaching disks. 还可以进行调整,以在现有 VM 上打开和关闭磁盘的主机缓存。You can also adjust to turn on and off host caching your disks on an existing VM.

主机缓存

可以调整主机缓存以满足每个磁盘的工作负荷要求。The host caching can be adjusted to match your workload requirements for each disk. 对于仅执行读取操作的工作负载,可以将主机缓存设置为“只读”;对于均衡地执行读取和写入操作的工作负载,可以将主机缓存设置为“读取/写入”。You can set your host caching to be Read-only for workloads that only do reading operations and Read/write for workloads that do a balance of read and write operations. 如果工作负载不符合上述任一模式,我们不建议使用“使用主机缓存”。If your workload doesn't follow either of those patterns, we don't recommend using use host caching.

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

设置:Set up:

  • 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 and there is no need to read from the disk. 此读取将计入 VM 的缓存限制。This read is counted towards the VM's cached limits.

读取主机缓存读取命中

当执行读取并且所需的数据在缓存上不可用时,读取请求随后将中继到磁盘,然后磁盘将其呈现给缓存和 VM。When a read is performed and the desired data is not available on the cache, the read request is then relayed to the disk who then surfaces it to both the cache and the VM. 此读取将同时计入 VM 的非缓存限制和 VM 的缓存限制。This read is counted towards 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 towards the VM's uncached limit and the VM's cached limit.

读取主机缓存写入

在下一个示例中,我们将了解当主机缓存设置设为“读取/写入”时,IO 请求会发生什么。In this next example, let's take a look at what happens with IO requests when the host cache setting is set to Read/write.

设置:Set up:

  • 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

在读取/写入缓存中,读取的处理方式与只读完全相同,只有写入是不同的。Reads are handled the exact same way as Read-only, writes are the only thing that is different with Read/write caching. 在将主机缓存设置为读取/写入的情况下进行写入时,只需要写入主机缓存即可视为完成。When writing with host caching 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,而当其延迟写入到磁盘时,将计入非缓存的 IO。This means that writes will be counted towards cached IO when it is written to the cache and when it is lazily written to the disk it will count towards the uncached IO.

读取/写入主机缓存写入

接下来,让我们继续讨论采用 Standard_D8s_v3 虚拟机的一个示例。Let's continue with an example with our Standard_D8s_v3 virtual machine. 除了这一次,我们将在磁盘上启用主机缓存,现在 VM 的 IOPS 限制为 16,000 IOPS。Except this time, we'll enable host caching on the disks and 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 handle 5,000 IOPS.

设置:Set up:

  • 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
  • 2 个 P30 数据磁盘2 P30 Data Disks
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host Caching: Read/write

主机缓存示例

现在,使用这个已启用缓存的 Standard_D8s_v3 虚拟机的应用程序会请求 15,000 IOPS。Now, The application using this Standard_D8s_v3 virtual machine with caching enabled makes a request for 15,000 IOPS. 这些请求将细分为每个附加的基础磁盘 5,000 IOPS,并且不会达到性能上限。Those requests are broken down as 5,000 IOPS to each underlying disk attached and no performance capping occurs.

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

虚拟机的缓存限制独立于其非缓存限制。A virtual machine's caching limits are separate from their uncached limits. 这意味着,你可以在附加到 VM 的磁盘上启用主机缓存,同时也可以不在其他磁盘上启用主机缓存,以允许虚拟机获得缓存限制外加非缓存限制的总存储 IO。This means you can enable host caching on disks attached to a vm while also not enabling host caching on other disks to allow your virtual machines to do get a total storage IO of the cached limit plus the uncached limit. 让我们通过一个示例来完成此操作,以便熟悉这些限制如何协同工作。我们将继续使用 Standard_D8s_v3 虚拟机和高级磁盘附加配置。Let's run through an example of this to help solidify how these limits work together and we'll continue with the Standard_D8s_v3 virtual machine and premium disks attached configuration.

设置:Set up:

  • 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
  • 2 个 P30 数据磁盘 X 22 P30 Data Disks X 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host Caching: Read/write
  • 2 个 P30 数据磁盘 X 22 P30 Data Disks X 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:已禁用Host Caching: Disabled

具有远程存储的主机缓存示例

现在,在 Standard_D8s_v3 虚拟机上运行的应用程序将请求 25,000 IOPS。Now, The application running on Standard_D8s_v3 virtual machine with makes a request for 25,000 IOPS. 此请求被分解为每个附加的基础磁盘 5,000 IOPS,其中 3 个磁盘使用主机缓存,2 个磁盘未使用。This request is broken down as 5,000 IOPS to each underlying disk attached where 3 of those disks are using host caching and 2 of the disks are not. 由于使用主机缓存的 3 个磁盘在缓存限制 16,000 内,因此这些请求会成功完成,不会达到存储性能上限。Since the 3 using host caching are within the cached limits of 16,000, those requests are successfully completed and no storage performance capping occurs. 另外,由于未使用主机缓存的 2 个磁盘在非缓存限制 12,800 内,因此这些请求也会成功完成,不会达到上限。Also, since the 2 disks not using host caching are within the uncached limits of 12,800, those requests are also successfully completed and no capping occurs.

磁盘性能指标Metrics for disk performance

我们在 Azure 上提供了一些指标,它们提供了有关虚拟机和磁盘的性能的见解。We have metrics on Azure that provides insight on how your virtual machines and disks are performing. 可以通过 Azure 门户直观地查看这些指标,也可以通过 API 调用来检索这些指标。These metrics can be viewed visually through the Azure portal or they can 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 throughput performance:

  • OS 磁盘队列深度 - 当前未完成的等待在 OS 磁盘中进行读取或写入操作的 IO 请求数。OS Disk Queue Depth - The number of current outstanding IO requests that 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 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 a 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 a 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 will be 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 will be 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%, you'll your application running will be 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 will be 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 will be 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 will be 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 will be 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 will be 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 set up is exactly what we had in the previous example, except this time our OS disk that we have attached is not cached.

设置:Set up:

  • 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
  • 2 个 P30 数据磁盘 X 22 P30 Data Disks X 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:读取/写入Host Caching: Read/write
  • 2 个 P30 数据磁盘 X 22 P30 Data Disks X 2
    • IOPS:5,000IOPS: 5,000
    • 主机缓存:已禁用Host Caching: Disabled

我们来对此 VM 和磁盘组合运行基准测试,这将创建 IO 活动,你可以在此处了解如何在 Azure 上对存储 IO 进行基准测试。Let's run a benchmarking test on this VM and disk combination that will do create IO activity and you can learn all about how to benchmark storage IO on Azure here. 通过基准测试工具,可以看到 VM 和磁盘组合能够实现 22,800 IOPS:From the benchmarking tool, you can see that the VM and Disk combination is able to achieve 22,800 IOPS:

指标菜单Metrics Menu

但是,Standard_D8s_v3 可实现总计 28,600 的 IOPS,使用指标可以调查正在进行的操作并识别存储 IO 瓶颈。However, the Standard_D8s_v3 can achieve a total of 28,600 IOPs, using the metrics lets investigate what is going on and identify our storage IO bottleneck. 首先,找到指标按钮左侧菜单并选择它:First, locate the metrics button left-hand side menu and select it:

指标菜单

我们先看一下 已使用的 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 is telling us out of the 16,000 IOPs allotted to the cached IOPs on the VM, 61% is being used. 这就意味着存储 IO 瓶颈与缓存的磁盘无关,因为该指标值没有达到 100%。This means that the storage IO bottleneck is not with the disks that are cached because it is not at 100%. 所以我们现在来看一下 已使用的 VM 未缓存 IOPS 的百分比 指标:So let's now take a look at our VM Uncached IOPS Consumed Percentage metric:

已使用的 VM 未缓存 IOPS 的百分比

此指标值已达到 100%,这告诉我们,在 VM 上分配给未缓存 IOPS 的所有 12,800 IOPS 均已使用。This metric is at 100%, telling 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 is by changing the size of our VM to a larger size that can handle the additional IO. 但在执行此操作之前,我们先来看一下附加的磁盘,以了解这些磁盘发生了多少 IOPS。But before we do that, let's take a look at the disk attached to see how many IOPs they are seeing. 我们先通过查看 已使用的 OS 磁盘 IOPS 的百分比 来看一下 OS 磁盘:Let's first take a look at the OS Disk by looking at the OS Disk IOPS Consumed Percentage :

已使用的 OS 磁盘 IOPS 的百分比

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

已使用的数据磁盘 IOPS 的百分比

此指标告诉我们,在所有附加的磁盘上,平均已使用的 IOPS 百分比约为 42%。This metric is telling 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 are not being served from the host cache. 让我们通过对这些指标应用拆分并按 LUN 值拆分来深入了解此指标:Let's drill deeper into this metric to see the by applying splitting on these metrics and splitting by the LUN value:

使用拆分的已使用的数据磁盘 IOPS 的百分比

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

存储 IO 指标示例图