top of page

Azure SQL VM disks configuration.

SQL Server is an IO-intensive application, so you need to carefully choose the right set of storage systems in the cloud environment to store SQL Server binaries and database files. If you will not choose an adequate disk type, then your application can face severe performance issues. Azure provides multiple different options for choosing SQL Server, from having different PAAS offering to Azure SQL VM, which is basically a VM pre-installed with SQL Server (can also be installed manually).

It is important to consider and know what the best practices are for choosing the disk and caching for the SQL Server data, log and tempdb files while using SQL VM.


General Considerations for Choosing DISK for Azure SQL VM

In Azure the IOPS changes as per the size of the disk (for premium SSD) and so does the costing.

As per above you can see that if you need anything more than 2 TiB you will be paying $240 extra every month having the same IOPS. So, in such scenarios it could be more cost appropriate to have another disk of 1 TiB. At the same time also consider that the 1 TiB drive will be having lesser IOPS of 5000 only but if your environment doesn’t need IOPS more then 5000 it will be better to use P30 + P40 instead of using a P50 drive.


The decision is much easier in Standard SSD or HDD drive as the IOPS remain constant irrespective of the drive size up till 8 TiB. So, if you are using lesser than 8 TiB better to distribute the files along a 1 TiB and 2 TiB drive for our above scenario.


Choosing Data DISK and Caching for Azure SQL VM

Depending on the type of load and size you can choose HDD, Standard SDD or Premium SSD. Again, if you are creating an Azure SQL VM for development better to choose a Standard SDD or even HDD as it will be able to suffice the general requirement for development.

For Testing you are better with using Standard SDD, and for Production use Premium SDD, still depends upon the load you are getting but having a better performing storage can save you headaches later on.

Inside the VM you can choose the type of caching you want your disk to have. There are three options available:

  1. Read-Only Caching: It improves latency and potentially gain higher IOPS per disk. Any data being read is stored in a local memory of the VM for faster retrievals on the second run and not on the Blob storage (disks).

  2. Read-Write Caching: Addition to what Read-Only cache is doing it also caches all the writes coming into the disk, by doing this it can acknowledge the application faster that the data is secured, but at the same time ensure that you have a proper way to write data from cache to persistent disks.

  3. None: As the name suggests it doesn’t cache anything.

Now coming back to our topic of choosing an appropriate data disk for Azure SQL VM, once you have made the choice of using the disk type based on your environment and utilization the next option to consider is the caching and for data disk you should choose the Read-only caching.


Choosing LOG files disk and Caching for Azure SQL VM

Similar to choosing the data disk, you should make the choice based upon the load and environment. Here as the Log files of all the data files are generally stored in the same location and depending upon how fast your environment is, generally in case of OLTP, you might need to choose a bigger disk disk for getting higher IOPS then you actually require based upon the size.


For caching, you should not choose any type of caching for your log files, as by using Read-Only caching it is not going to have any benefit from it as nothing is being read but sequentially written to the logs. And for Read-Write there is a big potential of data loss as if VM crashed the logs inside the cache, waiting to be written into the persistent storage, will be permanently lost.


Choosing TEMPDB disk and Caching for Azure SQL VM.

The first option for your TempDB files should always be the D drive of your VM which is the disk local to your VM. This local storage is very small and depends upon the size of VM chosen.

If your storage needs are more than the local storage better to use the Premium SSD for better throughput.


That's all in this post. If you liked this blog and interested in knowing more about Azure, Please Like, Follow, Share & Subscribeto www.ImJhaChandan.com.

Comentarios


jc_logo.png

Hi, thanks for stopping by!

Welcome! to my “Muse & Learn” blog.

This website will help you to learn useful queries/SQL, Tips to troubleshoot problem and their remediation, perform DB related activities etc... and don't forget to muse with us :)....

It cover few useful information on below topics :

 

MySQL, SQL Server, DB2, Linux/UNIX/AIX, HTML ....

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • Twitter
© 2023 By ImJhaChandan
bottom of page