Write a comment

The new driver for MCS, MCSIO v2, has been available since Citrix Virtual Apps and Desktop version 1903. However, two important performance counters "Cache memory used" and "Cache disk used" are missing in this new version to read out current values. In addition, the performance counter path has changed from \Citrix MCS Storage Driver to \Citrix MCS(*). Unfortunately, the currently used cache disk size can no longer be determined, but only the current size of the cache disk file (mcsdif.vhdx). I have developed a Powershell script that at least gives me a quick overview of the RAM and disk cache status.

The Powershell script must be executed on a Citrix Delivery Controller and as an administrator. However, the parameter MC must first be supplemented with the name of a machine catalog. After execution, the following is displayed:

RAM-Cache = RAM-Cache size (max.) set in the machine catalog
Used RAM = Curent used RAM-Cache

Disk = Disk-Cache size (max.) set in the machine catalog
Used Cache = Used Disk Cache at one point in time
Used Space = Total used Cache Disk space
Free Space = Total free Cache Disk pace

 

Explanation
The CVDA28 server currently uses 3,578 MB of a maximum of 4,096 MB of the RAM cache. However, during the previous runtime of the server, an overflow of 3.25 GB was necessary in the cache disk. This means that at a point in time, a cache of RAM and disk totaling 7.25 GB was required. However, the disk cache is currently not in use and only the RAM cache is still being used. 

As the cache disk (mcsdif.vhdx) is a dynamic disk, it does not shrink (compact) to zero by itself, but always retains the maximum value. In the picture, no server currently uses the cache disk and all work only from the RAM disk. Nevertheless, there was a time on all systems when the cache disk became necessary.

The drive on which the cache disk is located often contains additional data, such as redirected event logs, WEM cache, FSLogix cache, page file, etc. Therefore, the remaining free space of the drive is not the disk size minus the cache disk size. Therefore, there are still the values of free space and used space. 


Complete script at Github

https://github.com/Koetzing/Powershell-Scripts/blob/main/vda-checkcache.ps1

Write comments...
or post as a guest
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.