How to create striped disk on azure (AKA Raid 0)

Disk Striping use multiple disks and stripe them together to get a combined higher IOPS and Throughput limit. Note that the combined limit per VM should be higher than the combined limits of attached premium disks.

You can check the maximum number of disks you can add to a virtual machine from here: Sizes for Windows virtual machines in Azure

1. Create “new disk” from powershell:

clear

# RM stands for resource manager, and is the new way of managing things in Azure

# you need to login the first time using this command
# Login-AzureRmAccount

$vm = Get-AzureRmVM -ResourceGroupName "md-test-stripe" -Name "md-test-stripe"

# adds 16 disks
for($i=1; $i -le 16; $i++) {
    $name = "md-test-stripe-disk{0:00}" -f $i
    $lun = $i - 1
    $vhdUri = "https://mdteststripedisks447.blob.core.windows.net/vhds/md-test-stripe-disk{0:00}.vhd" -f $i

    Write-Host "Add-AzureRmVMDataDisk -VM $vm -Name $name -DiskSizeInGB 16 -Lun $lun -Caching None -VhdUri $vhdUri -CreateOption Empty"

    $vm = Add-AzureRmVMDataDisk -VM $vm -Name $name -DiskSizeInGB 16 -Lun $lun -Caching None -VhdUri $vhdUri -CreateOption Empty
}

$vm.DataDiskNames

# uncomment when you are ready, this updates the VM on azure!
# Update-AzureRmVM -ResourceGroupName "md-test-stripe" -VM $vm

2. Create “new storage pool” from server manager with all the new disks you added

3. Create “new virtual disk” from powershell:

New-VirtualDisk -FriendlyName "sql-stripe" -StoragePoolFriendlyName "sql-stripe" -Interleave 65536 -NumberOfColumns 16 -ProvisioningType Fixed -ResiliencySettingName "Simple" -UseMaximumSize

4. Create “new volume” from server manager formatting in NTFS with allocation unit size set to 64KB

Porting from SQLIO to DISKSPD: How to Test Disk Performance for SQL Server

DISKSPD TESTS

Original post related to SQLIO took from brentozar blog.

diskspd -w100 -t8 -d60 -o32 -r -b8K -Sh -L -c20G C:\test.dat
diskspd -w0 -t8 -d60 -o32 -r -b8K -Sh -L -c20G C:\test.dat
diskspd -w100 -t8 -d60 -o32 -si -b64K -Sh -L -c20G C:\test.dat
diskspd -w0 -t8 -d60 -o32 -si -b64K -Sh -L -c20G C:\test.dat

What Do the DISKSPD Parameters Mean?

While we’re looking at that set of commands, here’s a quick breakdown:

  • -w100 and -w0: means we’re testing writes (100% writes) or reads (0% writes).
  • -t8 and -o32: means 8 threads with up to 32 outstanding requests at once.
    DISKSPD isn’t CPU-bound at all, and you can use more threads than you have processors.
    The more load we throw at storage, the faster it goes – to a point.
  • -d60: means the test will last 60 seconds
  • -b8K and -b64K: the size of our IO requests in kilobytes.
    SQL Server does a lot of random stuff in 8KB chunks,
    and we’re also testing sequential stuff in 64KB chunks.
  • -r and -s: random versus sequential access.
    Many queries jump around randomly in the database, whereas things like backups,
    bulk loads, and table scans generally work sequentially.
  • -L: measure latency statistics.
  • -Sh: equivalent -Suw, disable software caching, equivalent to FILE_FLAG_NO_BUFFERING and enable writethrough (no hardware write caching), equivalent to FILE_FLAG_WRITE_THROUGH.
  • -c20G: create a file of 20GB. Size can be stated in bytes or KiB/MiB/GiB/blocks.

You’ll notice I’m using a lot of general terms here about how some application patterns work.
Every SQL Server database has its own access patterns – random, sequential, big chunks, small pieces, and so on.
The four test lines you see above are shorthand examples of how some SQL Server IO patterns work.
We’re going to run a quick 4-part test first, and then come back to run much more in-depth tests shortly.