none
Hyper-v memory problems

    Question

  • Hi,

    I have a windows server 2012 data center with 4 virtual machines. I have a total of 16GB of memory.

    All the virtual machines uses dynamic memory alocation.

    At this moment, hyper-v shows the assigned memory of one machine as 1.2GB. But when I connect to the machine I see 3.9GB used (total 4GB).

    But if I open task manager and sum the total memory used by all application and process the total is 2GB. 

    The total memory used in the host is 15.2GB (this can be the cause of this problem).

    I'm not understanding the differences between these numbers, I think this is caused by dynamic allocation of the memory, but I'm not understanding how is this working.

    Thank you for any help!

    Dennes


    Dennes - Se resolveu, classifique a mensagem, por favor - [http://www.bufaloinfo.com.br] NOVO DVD Segurança no ASP.NET : http://www.bufaloinfo.com.br/LearingSeriesSegurancaASPNET2.asp

    Tuesday, October 29, 2013 1:16 PM

All replies

  • First - do you RDP to your Hyper-V Server and use the Hyper-V Manager within this RDP session?  If so, do you Logout or Simply disconnect?  If you simply disconnect you expose an issue in RDP where the memory consumed in your session is not properly reclaimed and you end up with false memory consumption readings when you check the management OS.  Always logout of your management OS RDP session every so often to clean this up.

    okay, that said...

    With Dynamic Memory there are a number of things that must align.

    Always install / upgrade the Integration Components in the VM.

    The Startup Memory - the memory the OS in the VM is allocated at boot time.  If the OS in the VM is not dynamic memory aware, this is the RAM it gets, just like static, and depending on the OS in the VM - this can be the number you see when you check the OS in the VM. 

    The minimum - this is an idle state that the VM can dip down to, so a VM that is essentially idle can consume no more RAM than is necessary.

    the maximum - the most the VM can ever have.

    The demand - what the applications in the OS of the VM (plus the OS itself) is requesting.  This is a moment in time it can only be 0 or greater.  If it at 0 for too long (essentially negative) then RAM is de-allocated.

    The buffer - a cushion amount of RAM that is granted to the VM so that the VM always has extra RAM available for the applications to burst in to and use immediately.  As the applications can ask for RAM quicker than the hypervisor could respond in giving it - so the buffer always gives the VM some extra that is beyond what the VM is requesting to handle this.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Tuesday, October 29, 2013 4:11 PM
  • You should avoid thin provisioning of memory with dynamic memory, ie 4 VMs configured with 32 gb of max ram total when you only have 16 gb, you also have to assume the host needs ram too. You should also resist the temptation of using dynamic ram on exchange and SQL servers. make sure if you are using dynamic ram you have upper limits property configured.
    Thursday, October 31, 2013 12:39 PM
  • "You should avoid thin provisioning of memory with dynamic memory, ie 4 VMs configured with 32 gb of max ram total when you only have 16 gb"

    Do you have experience or documentation to back this up?  I have never seen anything like this from Microsoft.  In fact, when you create a VM with dynamic memory, the default max is 1 TB - more than any physical machine I have ever worked on.  I've been using dynamic memory since it first came out, and I have never seen an issue with using the default on several VMs running on a single host.

    The opposite is true - one should never try to configure a minimum memory requirement that is more than what is available.  But even there, Hyper-V will simply not start a VM if it cannot reserve memory on startup.  And, by default, Hyper-V reserves memory for itself that it will never give to VMs.

    Totally agree on the SQL and Exchange memory configurations.  There one should make the determination of what is the amount of memory that makes sense for running in their environment and then make it a fixed memory VM.


    .:|:.:|:. tim

    Thursday, October 31, 2013 1:33 PM
  • Tim has it - Hyper-V does not allow over-provisioning memory.

    If it physically exists, it can be used.  if it does not physically exist then the VMs simply cannot grow into their maximum because it isn't available.

    If the minimum memory is not available a VM won't boot.

    The host will not page RAM simply to give the VM RAM.  That is not a feature of Hyper-V.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Thursday, October 31, 2013 5:45 PM
  • Hi,

    The maximal memory value is you want split to the child vm biggest “percent” of your total memory. But if you use the dynamic memory the child vm will use its really needs physical memory ( You can see in the VMM), but that vm use the really physical memory value will limited between the minimum and the maximal value you set.

    More information:

    Hyper-V Dynamic Memory Configuration Guide

    http://technet.microsoft.com/en-us/library/ff817651(v=ws.10).aspx

    Hyper-V Dynamic Memory Overview

    http://technet.microsoft.com/en-us/library/hh831766.aspx

    Hope this helps.


    Alex Lv

    Tuesday, November 05, 2013 3:32 AM
  • Hi,

    Just want to confirm the current situations.

    Please feel free to let us know if you need further assistance.

    Regards.


    Alex Lv

    Tuesday, November 05, 2013 3:32 AM