验证存储帐户的吞吐量和延迟指标Verify throughput and latency metrics for a storage account

本教程是一个系列的第 4 部分,也是该系列的最后一部分。This tutorial is part four and the final part of a series. 在前面的教程中,已学习如何将大量随机数据上传和下载到 Azure 存储帐户。In the previous tutorials, you learned how to upload and download larges amounts of random data to an Azure storage account. 本教程演示如何在 Azure 门户中使用指标查看吞吐量和延迟。This tutorial shows you how you can use metrics to view throughput and latency in the Azure portal.

该系列的第 4 部分中介绍了如何:In part four of the series, you learn how to:

  • 在 Azure 门户中配置图表Configure charts in the Azure portal
  • 验证吞吐量和延迟指标Verify throughput and latency metrics

Azure 存储指标使用 Azure Monitor 提供用于深入了解存储帐户的性能和可用性的统一视图。Azure storage metrics uses Azure monitor to provide a unified view into the performance and availability of your storage account.

配置指标Configure metrics

导航到存储帐户中“监视”下的“指标” 。Navigate to Metrics under Monitoring in your storage account.

从“指标命名空间”下拉列表中选择“Blob”。 Choose Blob from the METRIC NAMESPACE drop-down.

在“指标” 下,选择下表中的指标之一:Under METRIC, select one of the metrics found in the following table:

可通过以下指标了解应用程序的延迟和吞吐量。The following metrics give you an idea of the latency and throughput of the application. 在门户中配置的指标在 1 分钟的平均值内。The metrics you configure in the portal are in 1-minute averages. 如果事务在一分钟的中间完成,则该分钟的数据是平均值的一半。If a transaction finished in the middle of a minute that minute data is halfed for the average. 在属于你应用程序的一个或多个进程和/或一个或多个计算机中,如果内存消耗量在较长的时间段(几个小时)内持续增加,将发出一个典型的通知。In the application, the upload and download operations were timed and provided you output of the actual amount of time it took to upload and download the files. 可以通过将此信息与门户指标结合使用来全面了解吞吐量。This information can be used in conjunction with the portal metrics to fully understand throughput.

指标Metric 定义Definition
Success E2E LatencySuccess E2E Latency 向存储服务或指定的 API 操作发出的成功请求的平均端到端延迟。The average end-to-end latency of successful requests made to a storage service or the specified API operation. 此值包括在 Azure 存储中读取请求、发送响应和接收响应确认所需的处理时间。This value includes the required processing time within Azure Storage to read the request, send the response, and receive acknowledgment of the response.
Success Server LatencySuccess Server Latency Azure 存储处理成功请求所用的平均时间。The average time used to process a successful request by Azure Storage. 此值不包括 SuccessE2ELatency 中指定的网络延迟。This value does not include the network latency specified in SuccessE2ELatency.
TransactionsTransactions 向存储服务或指定的 API 操作发出的请求数。The number of requests made to a storage service or the specified API operation. 此数字包括成功和失败的请求数,以及引发错误的请求数。This number includes successful and failed requests, as well as requests that produced errors. 在该示例中,块大小设置为 100 MB。In the example, the block size was set to 100 MB. 在这种情况下,每个 100 MB 的块被认为是一个事务。In this case, each 100-MB block is considered a transaction.
IngressIngress 流入数据量。The amount of ingress data. 此数字包括从外部客户端到 Azure 存储流入的数据量,以及流入 Azure 中的数据量。This number includes ingress from an external client into Azure Storage as well as ingress within Azure.
EgressEgress 流出数据量。The amount of egress data. 此数字包括从外部客户端到 Azure 存储流出的数据量,以及流出 Azure 中的数据量。This number includes egress from an external client into Azure Storage as well as egress within Azure. 因此,此数字不反映计费的流出量。As a result, this number does not reflect billable egress.

在“时间” 旁边选择“过去 24 小时(自动)” 。Select Last 24 hours (Automatic) next to Time. 针对“时间粒度” 选择“过去一小时” 和“分钟” ,然后单击“应用” 。Choose Last hour and Minute for Time granularity, then click Apply.

存储帐户指标

图表可以分配有多个指标,但分配多个指标将禁用按维度分组功能。Charts can have more than one metric assigned to them, but assigning more than one metric disables the ability to group by dimensions.

维度Dimensions

可使用维度深入了解图表和获取更多详细信息。Dimensions are used to look deeper into the charts and get more detailed information. 不同指标具有不同维度。Different metrics have different dimensions. 可用的一个维度是“API 名称” 维度。One dimension that is available is the API name dimension. 此维度将图表拆分为每个单独的 API 调用。This dimension breaks out the chart into each separate API call. 下面的第一个图显示存储帐户的总事务数的示例图表。The first image below shows an example chart of total transactions for a storage account. 第二个图显示相同图表,但选中了“API 名称”维度。The second image shows the same chart but with the API name dimension selected. 如你所见,列出了每个事务,从而让你详细了解按 API 名称进行了多少个调用。As you can see, each transaction is listed giving more details into how many calls were made by API name.

存储帐户指标 - 不带维度的事务

存储帐户指标 - 事务

清理资源Clean up resources

不再需要资源组、虚拟机和所有相关的资源时,可将其删除。When no longer needed, delete the resource group, virtual machine, and all related resources. 为此,请选择适用于 VM 的资源组,然后单击“删除”。To do so, select the resource group for the VM and click Delete.

后续步骤Next steps

在本系列教程的第四部分中,已学习了如何查看示例解决方案的指标,例如如何:In part four of the series, you learned about viewing metrics for the example solution, such as how to:

  • 在 Azure 门户中配置图表Configure charts in the Azure portal
  • 验证吞吐量和延迟指标Verify throughput and latency metrics

请访问以下链接,查看预先生成的存储示例。Follow this link to see pre-built storage samples.