Hello Richard Parry - Thanks for reaching Microsoft QnA platform
It seems you arre experiencing performance issues with your production VMs that aren't present in your development environment when connecting to your Azure SQL Database.
Here are a few things you can check and try out to help get those queries executed faster:
Run Azure Performance Diagnostics (PerfInsights): Start by collecting a baseline of the VM performance using Azure Performance Diagnostics (PerfInsights). This tool can help identify any resource contention that may be affecting performance.
Please go to the Azure portal and check the Metrics section for your VMs. Look specifically at:
- VM Cached Bandwidth and IOPS percentage
- VM Uncached Bandwidth and IOPS percentage
- Data Disk IOPS and Bandwidth percentage
- OS Disk IOPS and Bandwidth percentage
- Also ensure you're following best practices for SQL Server on Azure VMs. Common issues like incorrect storage types or VM sizing can lead to performance degradation.
- If you're not already using it, consider upgrading to Premium Storage for your Azure SQL Database, as this can provide much lower latency and higher performance for your workloads.
Investigate Network Latency: Since one VM is in Zone 1 and the other in Zone 2, there may be network latency issues. Ensure that all VMs are connected in the same zone, or test network latency specifically from your VMs to the Azure SQL database.
Also, check if you are using the temporary disk for TempDB. Configuring TempDB on a temporary disk can improve performance as per Microsoft guidelines.
- Upgrade VM Size: If diagnostics indicate that your VMs are hitting resource limits (CPU, Memory, etc.), consider resizing them to a larger SKU. Check the performance best practices for VM sizes to choose an appropriate size.
- B Series CPU Credit Model - https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/b-series-cpu-credit-model
By reviewing these factors, you'll be able to identify the causes of slower performance on the production VMs and determine the most effective ways to address them.
Regards
Himanshu Shekhar