Integrity streams can be managed at the file, directory, or volume level on ReFS, and settings can be changed at any time. Files and directories inherit the setting from their parent directory.
For a targeted approach on S2D, disable integrity streams only where write performance matters most instead of changing the whole volume.
Use these PowerShell cmdlets:
- Check the current setting for a file:
Get-FileIntegrity -FileName 'C:\Docs\TextDocument.txt'
- Check all files in a folder:
Get-Item -Path 'C:\Docs\*' | Get-FileIntegrity
- Disable integrity streams for a specific file:
Set-FileIntegrity -FileName 'H:\Docs\TextDocument.txt' -Enable $False
- Disable integrity streams for all files in a specific folder:
Get-Item -Path 'H:\Docs\*' | Set-FileIntegrity -Enable $False
- Set it directly on a directory so child items inherit the setting:
Set-FileIntegrity 'H:\Docs' -Enable $False
- Set it on the whole volume if needed:
Set-FileIntegrity H:\ -Enable $False
Important behavior and planning points:
- Integrity streams adds a performance cost.
- With integrity streams enabled, writes become allocate-on-write operations, which can increase fragmentation and delay reads.
- Checksum computation and validation can increase I/O latency.
- On performance-sensitive systems, leaving integrity streams disabled is recommended.
- The background scrubber validates file data only for files where integrity streams is enabled.
- In a Failover Cluster, Storage module cmdlets operate at the cluster level across all servers in the cluster.
If only certain workloads are affected, the most precise option is to disable integrity streams on the specific files or folders that need higher write IOPS, while leaving it enabled elsewhere for data protection.
References: