How temporary is Azure VM Temporary Storage?

Daniel picture Daniel · Aug 28, 2013 · Viewed 22.4k times · Source

When you create an Azure VM, it creates a D: drive named "Temporary Storage". It's unclear to me just how temporary this is though. Is it reset between reboots, start/stop, or just if the image is recreated? Or arbitrarily? Also, what are some use cases for this temporary storage?

Answer

Dijkgraaf picture Dijkgraaf · Aug 28, 2013

Resets, reboots, fail overs etc. can wipe it. It is only to be used for swap files etc.

Performance Best Practices for SQL Server in Azure Virtual Machines

Temporary Disk

The temporary storage drive, labeled as the D: drive is not persisted and is not saved in the Windows Azure Blob storage. It is used primarily for the page file and its performance is not guaranteed to be predictable. Management tasks such as a change to the virtual machine size, resets the D: drive. In addition, Windows Azure erases the data on the temporary storage drive when a virtual machine fails over. The D: drive is not recommended for storing any user or system database files, including tempdb.

EDIT: Interestingly enough the above has now been updated to the below which says that is is OK to store your tempdb on if you are using the D-Series Virtual Machines.

The temporary storage drive, labeled as the D: drive, is not persisted to Azure blob storage. Do not store your data or log files on the D: drive. Only store tempdb and/or Buffer Pool Extensions on the D drive when using the D-Series Virtual Machines (VMs). Unlike the other VM series, the D drive in the D-Series VMs is SSD-based. This can improve the performance of workloads that heavily use temporary objects or that have working sets which don't fit in memory. For more information, see Using SSDs in Azure VMs to store SQL Server TempDB and Buffer Pool Extensions.

Some Azure Virtual Machine Basics Please

The Temporary storage drive is a local drive on the physical box that should only serve as scratch space. For example, we put the paging file onto this drive to save on transaction costs for each Windows page-in but nothing else. I would recommend you don’t put anything that you need persisted on this drive as it will be deleted upon any hardware failure the system sees whereas the OS disk and any data disks attached will remain persisted in storage even on hardware failures.