question

Caspar-3353 avatar image
0 Votes"
Caspar-3353 asked ElevenYu-MSFT commented

Hyper-V 2019 reports much higher memory demand for VM

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?

windows-server-hyper-v
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Could you please help to click "Accept Answer" and upvote it if the answer is helpful?

Thanks a lot.

0 Votes 0 ·

1 Answer

ElevenYu-MSFT avatar image
0 Votes"
ElevenYu-MSFT answered ElevenYu-MSFT commented

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.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for this information. I have used RAMMap on both the Hyper-V server and on a virtual machine.
The VM has 16GB memory



RAMMap Hyper-V 2019 server:

113297-rammap-hyper-v-2019.png






0 Votes 0 ·

RAMMap for the VM: 16GB RAM and 24GB memory demand from hyper-v

113313-rammap-vm.jpg


0 Votes 0 ·
rammap-vm.jpg (88.8 KiB)

Hi,

We only need to check "Driver locked" on the host. From the screenshot, there really existed dynamic RAM assigned to VMs.

Are all the VMs on this host set up with Fixed Memory (dynamic memory is not enabled for all VMs)? If so, there should be some problems need to be further investigated.

You might need to capture some dumps or traces for further analysis, which I suggest to contact Microsoft Customer Support and Services where more in-depth investigation can be done so that you would get a more satisfying explanation and solution to this issue.


You may find phone number for your region accordingly from the link below:
Global Customer Service phone numbers
https://support.microsoft.com/en-us/help/4051701/global-customer-service-phone-numbers

0 Votes 0 ·

Thank you, I will look into that. Here's the example of how all the VM's are configured.

113730-memory-vm.jpg


0 Votes 0 ·
memory-vm.jpg (44.4 KiB)
Show more comments