One of the new features that is available with Acropolis Block Services on Nutanix Acropolis 4.7 is SCSI unmap support. SCSI unmap (similar to TRIM used on SSD’s) is part of the T10 SCSI spec that commands a disk region to deallocate its deleted space so it can be reused when data is removed. The only way to reclaim storage at the virtualized guest level with virtual disks that do not support unmap, is to manually write a string of zero’s at the guest level. Depend on your storage vendor, this would potentially cause a performance impact due to the large amount of writes required for this operation. With Windows Server 2012 R2, unmap is scheduled weekly using disk defragmenter, or “optimize drives” as it is now called.
As you can see in the Optimize Drives Screenshot, the Media type is different according to if the disk supports unmap or not.
- Hard disk Drive – In this case, this is a traditional VMDK stored on a NFS volume since my Hypervisor is vSphere. Even though the VMDK is thin, traditional defragmentation will be performed during optimization as SCSI unmap capabilities are not translated to NFS commands. The only to reclaim storage is this case is to write a string of zeroes in the free space of the disk which will be picked up and reclaimed during a Nutanix Curator Scan (Every six hours)
- Thin Provisioned drive – This is a Nutanix vdisk presented to the Guest via in-guest iSCSI using Acropolis block services. Since the disk reports itself as Thin, defrag is disabled and the disk will send unmap commands instead of defrag when the “Optimize” button is clicked. This space will then be reclaimed on the Nutanix distributed storage fabric.
To see these capabilities in action, I have created a single 200GB vdisk in a volume group and attached it to a Windows 2012 R2 Test VM running vSphere 6.0. I formatted the disk as “F:” and then filled the disk up with 100GB of data as you can see in the below screenshots.
You can see the virtual disk now reports it’s physical usage as 99.59 GiB in Nutanix Prism
Next I deleted the files, and performed an optimize operation using disk defragmenter. Unmap is then performed on the thin disks, You can track progress by seeing how much the disk is “Trimmed” in the current status tab.
It only took around 10 seconds to unmap 100GB of data, much quicker and less resource intensive than manually writing zero’s to the disk.
Now you can see the disk physical usage is back to it’s original capacity in Nutanix Prism.
As you can see there is not much effort to reclaim storage when using acropolis block services. This functionality also works if you are using Acropolis Hypervisor (AHV), as all vdisks are presented using iSCSI that supports unmap. I will be testing this in a future blog post.