Understanding Azure Virtual Machine IOPS, throughput and disk latency – Part 2
Continuing on from Part 1 : https://blogs.technet.microsoft.com/andrewc/2016/09/09/understanding-azure-virtual-machine-iops-throughput-and-disk-latency
Part 1 showed the IOPS, throughout and latency characteristics of an Azure disk when there was no caching involved.
This post covers the impact of caching and premium storage.
Test 4 – Read Cache – Standard Disk.
We will re-run the tests using the F: drive, which is a standard disk with Read Caching turned on
Results :
Read IOPS is now showing ~32000 – on a standard 500 IOPS disk.
Using the same F: drive, change the Access Specification to 100% write and re-run.
In this case, the IOPS are still ~500 as write operations are not cached.
Test 5 – Read/Write Cache – Standard Disk
Now switch to drive G: which has both read and write caching enabled.
With the access specification still set to 100% write, we find ~32000 IOPS
Summary:
- Caching *may* make significant difference to the apparent performance of the disk subsystem
- I say apparent, because actual throughput to/from the disk subsystem is unchanged – but cache can reduce the number of IOs that occur.
- Read cache will not necessarily improve performance for any given application – it depends on the application and data profile.
- Write cache should be used with care as data loss is possible in the event of a hardware issue with the physical server holding the cache before it is written to disk.
- Consult any guidance or best practices for the specific application in question
Test 6 – SSD Premium Storage
Switching to drive I: (Premium P30 disk) and rerunning the same tests, we see:
Read operations when using a small block size generates 5000 IOPS as per spec.
Changing the block size to 256k and re-running :
The IOPS is lower because we hit the 200MB/s throughput limit:
Testing latency by changing outstanding IO to 1
Latency is ~1.6ms (compared to 5ms + for standard storage)
Summary:
- Premium storage can achieve 10 times the IOPS, 3 times the throughput and 1/3 the latency when compared to standard disks.
- While the raw numbers are better, the same constraints around single threaded IO still apply.
Test 7 – Using the Local D: temp disk
All Azure virtual machines have a temporary disk, presented as D: drive on Windows and /dev/sdb on Linux.
The temp disk is designed for temporary working storage for applications and processes, but not long term storage . The contents will be lost if the VM is moved to another host.
Re-running the previous tests :
Read Performance small blocks:
Read Performance large blocks:
IO Latency when using outstanding IO set 1:
Summary
- The local temporary disk can provide high IOPS, high throughput and low latency compared to permanent blob/vhd storage.
- Use with care as the data is transient.
- Using D: for SQL Server tempdb is supported and documented :