Memory usage on Azure Stack HCI/Storage Spaces Direct

Hello everyone, it’s been a while since my last post. So i thought i should share some something i could not find any other explanation on. And that is…..

My server is using 50GB+ of memory and i have no VM’s on it. Why is it doing that? Well there are a few explanations for that.

  • A powershell window is open on the host consuming memory.
  • CSV BlockCache
  • Cache drives

So let’s start with the easiest first

Powershell Window on the Host

You could have a powershell window open on the host that is consuming alot of memory. With for instance watch-cluster.ps1 this is normal as it will just consume more and more memory it’s running. And it won’t free up that memory even if you stop the PS script.

It will only clear up the memory when you close the powershell window.

The second is

CSV BlockCache

On windows server 2019 and Azure Stack HCI, the CSV BlockCache is enabled by default and set to 1024MB wich is 1GB. So if this is enabled it will use 10GB of memory on every host that has a CSV on it. The cache size shared by all CSV’s on that host, so it will not multiply by nr of CSV’s you have. This memory usage is not shown in task manager and can only be seen by running

(Get-Cluster).BlockCacheSize

To change this setting you can run this command on your cluster, i tend to set this between 10 – 50 Gbyte depending on how much memory is on each node.

(Get-Cluster).BlockCacheSize = 10240

Last but not least

Cache Drives

Cache drives also play a big role on how much memory is being used by a node. A node uses 4GB of memory pr 1TB cache. So if you have 4×3.2TB cache drives, you are using 12.8 x 4GB wich is 51.2GB of memory pr node just for the cache drives. It is stated here, under memory requirements for S2D.

This memory usage is also not visible anywhere on the server and needs to be calculated based on the nr of cache drives and the size of them by 4GB.

If you still are using more memory then what is calculated with CSV BlockCache and Cache Drives memory usage, i recommend looking at Processes and sort on memory usage in Windows Admin Center. and see what is actually using memory. It could be the system which is pretty normal. But it should not be too high. If so something might be wrong and you need to involve support in what is using all that memory.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.