Cluster Shared Volumes (CSV) Cache is a feature which allows you to allocate system memory (RAM) as a write-through cache. The CSV Cache provides caching of read-only unbuffered I/O. This can improve performance for applications such as Hyper-V, which conducts unbuffered I/O when accessing a VHD or VHDX file. Unbuffered I/O’s are operations which are not cached by the Windows Cache Manager. What CSV Block Cache delivers is caching which can boost the performance of read requests, with write-through for no caching of write requests.
CSV Cache delivers caching at the block level, which enables it to perform caching of pieces of data being accessed within the VHD file. The primary difference from caching solutions in the form of a PCI card with flash which you add to the server, is that CSV Block Cache reserves its cache from system memory. The CSV Cache also tracks VM mobility and invalidates the cache when it moves from host to host, this removes the need to replicate and keep the cache coherent on all nodes in the cluster. This improves efficiency by not having to cache all VMs on all nodes, as well as reduces the performance overhead of pushing the data between nodes.
CSV Cache is completely integrated into the Failover Clustering feature and handles orchestration across the sets of nodes in the cluster.
CSV Cache will deliver the most value in scenarios where VMs are heavy read requests, and are less write intensive. Scenarios such as Pooled VDI VMs or also for reducing VM boot storms. Because the applicability of CSV Cache depends on the workload and your specific deployment considerations, it is disabled by default. The customer feedback on CSV Cache has been overwhelmingly positive and we generally recommend turning it on for all scenarios, including both Hyper-V Clusters using CSV and Scale-out File Servers using CSV.
You can allocate up to 80% of the total physical RAM for CSV write-through cache, which will be consumed from non-paged pool memory.
There are two configuration settings that allow you to control CSV Cache.
The CSV Cache is disabled by default, you only need to define how much memory you want to allocate to enable it with the following process:
(Get-Cluster). BlockCacheSize = 1024
Once the CSV Cache is enabled, all disks on all nodes will be cached by default. You have the flexibility to disable the CSV Cache on an individual disk using the following process:
Get-ClusterSharedVolume “Cluster Disk 1” | Set-ClusterParameter EnableBlockCache 0
The CSV Cache also provides a set of counters you can use to monitor the performance of the cache. You can leverage the Performance Monitor tool (PerfMon.msc) to add the following counts to monitor different aspects of the CSV Cache.
Open Performance Monitor, and under Add Counters you will find “Cluster CSV Volume Cache” with the following counters.
I/O satisfied from cache:
I/O satisfied from disk:
Total I/O:
The CSV Cache was introduced in Windows Server 2012 and the above applies to all releases following. The CSV Cache has evolved over the releases, and below are a list of considerations with previous releases .
(Get-Cluster). SharedVolumeBlockCacheSizeInMB = 1024
Get-ClusterSharedVolume “Cluster Disk 1” | Set-ClusterParameter CsvEnableBlockCache 1
Thanks!
Elden Christensen
Principal PM Manager
Clustering & High-Availability
Microsoft
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.