Q: What is Cluster Shared Volumes (CSV) cache and how do I enable it?
A: Cluster Shared Volumes (CSV) use unbuffered I/O for read and write operations, which means no caching is ever used. Windows Server 2012 introduced the ability to use a portion of the system memory as a read cache for CSV, which will improve read performance. There are two steps to enable in Windows Server 2012 and only one step to enable in Windows Server 2012 R2.
First, the amount of memory that can be used by the host for CSV Cache must be configured. In the examples below I set a value of 4GB.
Windows Server 2012:
(Get-Cluster).SharedVolumeBlockCacheSizeInMB = 4096
Windows Server 2012 R2:
(Get-Cluster).BlockCacheSize = 4096
For Windows Server 2012 the CSV Cache must be enabled on a per-disk basis. For Windows Server 2012 R2 the CSV Cache is enabled by default. To enable a disk for CSV Cache with Windows Server 2012 use command:
Get-ClusterSharedVolume "Cluster Disk 1" | Set-ClusterParameter CsvEnableBlockCache 1
The property is renamed to EnableBlockCache in Windows Server 2012 R2 if you ever wanted to disable CSV Cache for a specific disk.
No reboot is required.