I am trying to set up SQL Server on an Azure VM (that has an SSD) per the following articles:
- Performance Best Practices for SQL Server in Azure Virtual Machines
- Using SSDs in Azure VMs to store SQL Server TempDB and Buffer Pool Extensions
Specifically, one of the recommendations says:
Avoid using Azure data disk caching options (caching policy = None).
I would like to do that for the temp disk. In order to do that, it seems I need to use the PowerShell cmdlet Set-AzureDataDisk
. One of the parameters is the LUN of the disk. To get the LUN, it seems I need to use diskpart
.
However, on my freshly-provisioned VM, diskpart
shows that the temp drive and the system drive have the same LUN ID (#0). Here's what diskpart
shows for the system disk:
DISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> detail disk
Virtual HD ATA Device
Disk ID: 8C35C300
Type : ATA
Status : Online
Path : 0
Target : 0
LUN ID : 0
Location Path : ACPI(_SB_)#ACPI(PCI0)#ACPI(IDE0)#ACPI(CHN0)#ATA(C00T00L00)
Current Read-only State : No
Read-only : No
Boot Disk : Yes
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No
And here is what it shows for the temp disk:
DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> detail disk
Virtual HD ATA Device
Disk ID: F26B3A20
Type : ATA
Status : Online
Path : 0
Target : 1
LUN ID : 0
Location Path : ACPI(_SB_)#ACPI(PCI0)#ACPI(IDE0)#ACPI(CHN0)#ATA(C00T01L00)
Current Read-only State : No
Read-only : No
Boot Disk : No
Pagefile Disk : Yes
Hibernation File Disk : No
Crashdump Disk : Yes
Clustered Disk : No
My questions are:
- Am I even going down the right path?
- Can I just set the cache policy for both the system and temp disks? What is the impact?
- If not, how do I get the temp disk to be on a different LUN?