Hyper-V 2019 reports much higher memory demand for VM

Caspar 281 Reputation points
2021-07-08T07:57:01.407+00:00

Hi, we often notice that Hyper-V 2019 is reporting a much higher memory demand for a couple of our virtual machines. These virtual machines are all Windows Server 2019 Standard. Domain controllers, Print servers, Data servers etc.

For example we have one Domain Controller (VM) assigned 4096 MB of memory (non dynamic). If you logon to the server it shows it is never using more than 2800 MB of RAM over a period of monitoring it for a whole week.
But if you open the Hyper-V console it shows Assigned Memory: 4096 MB - Memory Demand: 7376 MB

Can anyone comment on why it seems to think it needs more memory even though I never see it going above 3GB while it has 4GB assigned? Is this a bug and can I ignore this or is something else going on here. This behavior happens to a couple other VM's as well.

If it does need more memory somehow the VM could actually be swapping on the disks or ssd's on the datastore. If too many VM's do this it could in theory wear out the SSD's much faster where the virtual disks are located right?

Any clue on this?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,637 questions
{count} vote

Accepted answer
  1. Eleven Yu (Shanghai Wicresoft Co,.Ltd.) 10,726 Reputation points Microsoft Vendor
    2021-07-09T02:47:15.9+00:00

    Hi,

    Thank you for posting the question in Q&A forum.

    I have done some researches and found most similar cases (Memory Demand higher than Assigned Memory) occurred when dynamic memory is enabled. But in my lab environment, I also found one VM had the same situation as yours. But due to the limits of lab environment, I have no chance to proceed further tests.

    In summary, Memory Demand is derived from performance counters, which is the amount of memory required at this time to fulfill the requirements of what is going on in the running VM. The Memory Demand is a moment in time. It is constantly changing as the running processes in the VM change.

    Hyper-V showing much higher memory demand than displayed in guest OS
    Re-calculate memory demand on a vm in Hyper-V

    You have mentioned that you never saw the VM memory usage was going above 3GB. Was you monitoring the memory by Task Manager. If so, we do not suggest it.
    Windows Task Manager doesn’t show real usage of CPU and memory by a virtual machine. This is because the Task Manager doesn’t identify machines as being virtual and cannot know how resources are provisioned to a VM.

    We suggest that you could use RAMMap for VM memory monitoring. There is one Count named "Driver Locked". It will be displayed if there is dynamic RAM once being assigned to VM. So, if your VM really asked for additional memory exceeding the assigned memory, the "Driver Locked" will show it. If there is no "Driver Locked" during the monitor, it means your VM didn't require more memory, you can just ignore the Memory Demand.

    RAMMap v1.60
    What is Driver Locked memory?

    Thanks,

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.


0 additional answers

Sort by: Most helpful