TRIM and PVS: vDisks may Reduce in Size after a Merged Base

TRIM and PVS: vDisks may Reduce in Size after a Merged Base

book

Article ID: CTX234995

calendar_today

Updated On:

Description

After performing a Merged Base operation on a vDisk that is utilizing the VHDX file format, the resultant merged base VHDX file may be smaller than the original base VHDX file. For example, this behavior might occur in situations where files are deleted in a particular vDisk version, and these files are no longer available in the merged base VHDX. 

This behavior is a result of a VHDX optimization from the file system TRIM feature that began with Windows 7 and Windows Server 2008R2. Whenever file delete operations are performed, the OS will send TRIM to block storage, and PVS will in turn mark specified VHDX blocks as free space. Whenever PVS merges the VHDX vDisk to a new base, it skips blocks marked as free and does not copy over these blocks to the new vDisk which may result in a smaller total base VHDX size.

Issue/Introduction

After performing a Merged Base operation on a vDisk that is utilizing the VHDX file format, the resultant merged base VHDX file is smaller than the original base VHDX file. 

Additional Information

New API allows apps to send "TRIM and Unmap" hints to storage media:
https://msdn.microsoft.com/windows/compatibility/new-api-allows-apps-to-send-trim-and-unmap-hints