In a VDI environment each CPU cycle, megabyte of memory or disk IO that can be reduced may represent considerable performance improvement when the workload is characterized by hundreds or thousands of desktops. Disk alignment is a topic that has been discussed to exhaustion, but the use of the correct block/cluster size for your workload is something that will drastically improve your VDI disk IO performance.
Have you ever analysed your VDI IO length trend?
Your answer is most likely NO, but you should.
I will start the discussion saying that to obtain best performance from the IO stack, all storage layers must be properly aligned and they must use analogous cluster/block block size. There is a good article from Duncan Epping, and there you will find a comment from Vaughn Stewart.
Storage arrays from other vendors store data in other block, or chunk, sizes. Say your array stores data in a 64 KB block. In this configuration if the GOS partition is misaligned then should a VM make a 4KB read request we will read a 64KB block. As I’ve stated before most data reads aren’t that small, so let’s consider a 1MB read request. In this case the array would retrieve 1MB plus an additional 64KB block. In this case the overhead on the array is around 1%. So if we consider my premise that many non-busy VMs make requests in the 32KB to 128KB range the overhead with a misaligned 64KB block would be between 200% and 50%.
I have performed IO Length trending analysis on different VDI environments to understand how virtual desktops are issuing IOs. What I found is quite contradictory to what I have been reading. Some documentation, including VMware ones, mention that Windows XP uses 64kb block IO request in it’s majority, but that is not what I was able to observe.
Three different samples collected from Windows XP 32b using vSCSIStats tool had the majority of the IOs issued with 4kb length. That’s is not hard to understand as Microsoft’s The Default Cluster Size for the NTFS and FAT File Systems article make the following mention:
(logical volume) Cluster size Sectors
512 MB or less 512 bytes 1
513 MB – 1,024 MB (1 GB) 1,024 bytes (1 KB) 2
1,025 MB – 2,048 MB (2 GB) 2,048 bytes (2 KB) 4
2,049 MB and larger 4,096 bytes (4 KB) 8
The results collected were as follows:
Disk alignment is important but the use of the correct block size for your VDI needs is essential to achieve the ultimate IO performance from your storage array. I recommend you to perform the IO Length trending analysis using vSCSIStats tool or the tunning tool provided by your array vendor to determine the best cluster size for your VDI workload.
The one size fits all doesn’t apply here and that is what most storage vendors will try to fit you in.
In my examples the majority of IO lengths are 4kb. If the array volume was created, let’s say, with 64kb blocks, each IO request will require the storage array to read an extra 60Kb to satisfy a 4kb request. Seems like a waste of reads/writes, doesn’t?
The good thing is that most arrays will allow you to specify volume block size during creation time based on the RAID type you are using.
Windows 7 might have a complete different set of IO lengths and that’s what I will sample next.