Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✔️ Linux VMs ✔️ Windows VMs
Performance Diagnostics (PerfInsights) helps identify and troubleshoot performance issues on Azure virtual machines. It provides insights into high resource usage such as high CPU, memory, and disk usage, and helps you understand the root cause of performance issues.
Run Performance Diagnostics directly from the Azure portal where you can review insights and reports about logs, configuration, and diagnostics data for the VM. Use this information to diagnose your issue before contacting Microsoft Support.
Performance Diagnostics stores all insights and reports in a storage account that you can configure for short data retention to minimize costs.
Performance Diagnostics modes
Performance diagnostics operates in one of the following two modes:
- Continuous diagnostics collects data at five-second intervals and reports actionable insights about high resource usage every five minutes.
- On-demand diagnostics helps you troubleshoot an ongoing performance issue by providing more in-depth data, insights, and recommendations that are based on data that's collected at a single moment. On-demand diagnostics is supported on both Windows and Linux.
The following table compares the data provided by Continuous and On-demand Performance Diagnostics. For a complete list of all the collected diagnostics data, see Data collected.
| Continuous | On-demand | |
|---|---|---|
| Insights generated | Continuous actionable insights into high resource usage, such as high CPU, high memory, and high disk usage | On-demand actionable insights into high resource usage and various system configurations |
| Data collection frequency | Collects data every five seconds. Updates are uploaded every five minutes. | Collects data on demand for the selected duration of the on-demand run |
| Reports generated | Doesn't generate a report | Generates a report that has comprehensive diagnostics data |
Supported troubleshooting scenarios
The following sections describe common scenarios for using continuous and on-demand performance diagnostics to identify and troubleshoot performance issues.
Continuous diagnostics
Continuous Performance diagnostics lets you identify high resource usage by monitoring your VM regularly for:
- High CPU usage: Detects high CPU usage periods, and shows the top CPU usage consumers during those periods.
- High memory usage: Detects high memory usage periods, and shows the top memory usage consumers during those periods.
- High disk usage: Detects high disk usage periods on physical disks, and shows the top disk usage consumers during those periods.
On-demand diagnostics
On-demand diagnostics provides different information between Windows and Linux VMs. The following sections describe the scenarios that are available for each platform. For more details on each report, see On-demand reports.
| Report | Description |
|---|---|
| Quick performance analysis | Basic overview of the VM's configuration and performance including event logs, disk configuration, and network usage. |
| Benchmarking | Runs a benchmark test (IOPS and MBPS) for all drives that are attached to the VM. |
| Performance analysis | Checks for resource consumption, known issues, analyzes best practices, and collects diagnostics data. |
| Azure Files analysis | Runs a special performance counter capture with a network trace. Includes all the Server Message Block (SMB) client shares counters. |
| Advanced performance analysis | Select traces to run in parallel. |
Data collected
Performance Diagnostics collected the information in the following table from Windows machines depending on the performance scenario you're using.
| Data collected | Quick performance analysis | Benchmarking | Performance analysis | Azure Files analysis | Advanced performance analysis |
|---|---|---|---|---|---|
| Information from event logs | Yes | Yes | Yes | Yes | Yes |
| System information | Yes | Yes | Yes | Yes | Yes |
| Volume map | Yes | Yes | Yes | Yes | Yes |
| Disk map | Yes | Yes | Yes | Yes | Yes |
| Running tasks | Yes | Yes | Yes | Yes | Yes |
| Storage reliability counters | Yes | Yes | Yes | Yes | Yes |
| Storage information | Yes | Yes | Yes | Yes | Yes |
| Fsutil output | Yes | Yes | Yes | Yes | Yes |
| Filter driver info | Yes | Yes | Yes | Yes | Yes |
| Netstat output | Yes | Yes | Yes | Yes | Yes |
| Network configuration | Yes | Yes | Yes | Yes | Yes |
| Firewall configuration | Yes | Yes | Yes | Yes | Yes |
| SQL Server configuration | Yes | Yes | Yes | Yes | Yes |
| Performance diagnostics traces * | Yes | Yes | Yes | Yes | Yes |
| Performance counter trace ** | Yes | Yes | |||
| SMB counter trace ** | Yes | ||||
| SQL Server counter trace ** | Yes | Yes | |||
| Xperf trace | Yes | ||||
| StorPort trace | Yes | ||||
| Network trace | Yes | Yes | |||
| Diskspd benchmark trace *** | Yes |
Performance impact
The following table shows the results of running 12-hour tests of continuous Performance Diagnostics on a range of Windows OS versions, Azure VMs of sizes, and CPU loads. These results show a minimal effect on system resources.
| OS version | VM size | CPU load | Average CPU usage | 90th percentile CPU usage | 99th percentile CPU usage | Memory usage |
|---|---|---|---|---|---|---|
| Windows Server 2019 | B2s, A4V2, D5v2 | 20%, 50%, 80% | <0.5% | 2% | 3% | 42-43 MB |
| Windows Server 2016 SQL | B2s, A4V2, D5v2 | 20%, 50%, 80% | <0.5% | 2% | 3% | 42-43 MB |
| Windows Server 2019 | B2s, A4V2, D5v2 | 20%, 50%, 80% | <0.5% | 2% | 3% | 42-43 MB |
| Windows Server 2022 | B2s, A4V2, D5v2 | 20%, 50%, 80% | <0.5% | <0.5% | 3% | 42-43 MB |
Storage costs
Assuming steady stress on the VM, the storage cost for continuous performance diagnostics is estimated to be less than one cent per month, assuming that you use locally redundant storage. It stores insights in a table and a JSON file in a BLOB container. Each row is approximately 0.5 KB, and the report is approximately 9 KB before compression. Two rows every five minutes plus the corresponding report upload equals 10 KB, or 0.00001 GB.
To calculate the storage cost:
- Rows per month: 17,280
- Size per row: 0.00001 GB
- Total data size: 17,280 x 0.000001 = 0.1728 GB
See Azure Blob Storage pricing for the latest prices.
Moving VM across regions
Azure VMs, and related network and storage resources, can be moved across regions by using Azure Resource Mover. However, moving VM extensions, including the Azure Performance Diagnostics VM extension, across regions isn't supported. You have to manually install the extension on the VM in the target region after you move the VM. For more information, see Support matrix for moving Azure VMs between Azure regions.
Sharing diagnostics data with Microsoft Support
When you open a support ticket with Microsoft, it's important to share the Performance Diagnostics report from an on-demand Performance Diagnostics run. The Microsoft Support contact provides the option to upload the on-demand Performance Diagnostics report to a workspace. Use either of the following methods to download the on-demand Performance Diagnostics report:
- Download the report from the Performance Diagnostics blade or storage account, as described in Analyze Performance Diagnostics insights and reports.
Contact us for help
If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.