If you are a developer using SQL Server, you've probably heard of Azure SQL Database and you've probably been thinking about migrating your on-premise or VM-based SQL Server database(s) to Azure SQL Database. If so, you've probably asked yourself, "which service tier and performance level should I use and how many database throughput units (DTUs) am I using now?" This calculator will help you determine the number of DTUs for your existing SQL Server database(s) as well as a recommendation of the minimum performance level and service tier that you need before you migrate to Azure SQL Database. Knowing the minimum service tier will allow you to get the performance you need while minimizing your costs.
If you are unfamiliar with the terms sevice tiers, performance levels, and DTUs, see Azure SQL Database Service Tiers and Performance Levels for more information. If you haven't determined an initial service tier based on feature capability, we recommend you visit Upgrade SQL Database Web or Business Databases to New Service Tiers for guidance before using this calculator.
This site is in no way affiliated with, nor has it been authorized, sponsored, or otherwise approved by, Microsoft Corporation. All product names, logos, copyrights, and trademarks mentioned are acknowledged as the registered intellectual property of their respective owners.
To get started, you'll need to determine if you want to calculate DTUs for a single database or a pool of databases. Typically, if you have three or more databases with varying and unpredictable resource consumption (CPU, memory, and IO), pooling your databases simplifies the process of creating, maintaining, and managing those databases. Visit the Elastic Databases guidance to learn more.
To measure resource utilization for your database server, you'll need to capture several performance metrics on your SQL server. To provide the most accurate measurement, you should run a representative production workload during a time period that captures the expected range of usage. Measure the following utilization metrics for at least an hour so the calculator can analyze utilization over time to provide you the best recommendation:
To assist in capturing the correct performance metrics, use one of the following utilities (Command Line EXE or PowerShell Script) to capture your database utilization. The utility and script are configured to capture the above performance counters for a one hour period.
The following utilities (Command Line EXE and PowerShell Script) capture CPU and IOPS at the server level, not for a specific database. To capture performance at the database level, you'll need to use SQL Server DMVs to isolate the database. Unfortunately, I don't have a script and I can't provide additional guidance.
Once the script completes, enter the number of cores for your server and upload the CSV file generated by the script. Click the Calculate button to view your recommended Service Tier/Performance Level and DTUs.
Measuring resource utiliztion for multiple databases is similar to measuring resource utiliation for a single database. In fact, the performance scaling of individual databases within an elastic database pool is possible because each database within a pool uses eDTUs from a shared set of DTUs associated with the pool. This allows databases under heavy load to consume more eDTUs to meet demand, while databases under light load consume less eDTUs, and databases under no load don’t consume any eDTUs.
To calculate eDTUs for multiple databases, you'll need to capture several performance metrics for each database on your SQL server(s). To provide the most accurate measurement, you should run a representative production workload during a time period that captures the expected range of usage. Measure the following utilization metrics for at least an hour so the calculator can analyze utilization over time to provide you the best recommendation:
For simplicity in capturing the correct performance metrics, use the following PowerShell script to capture your database utilization. The script is configured to capture the above performance counters for a one hour period. To use, click the link and download the zip file on to your SQL server, extract the contents and run the script by right-clicking and selecting, 'Run with PowerShell.'
Once the script completes for each one of your databases or your SQL Server, enter the number of cores for your server, the number of databases on that server, and upload the CSV file generated by the script. Click the Calculate button to view your recommended Service Tier/Performance Level and DTUs.
After clicking the Calculate button, you'll see several charts which provide an analysis of your database resource consumption. The charts depict the percentage of time (based on your measurements) that your database's resource consumption fits within the limits of each Service Tier/Performance Level. You can review CPU, Iops, and Log individually as well as collectively to better understand which metric(s) affect the performance of your database.