Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

Using Dynamic Memory on Hyper-V 2008 R2 SP1

Using Dynamic Memory on Hyper-V 2008 R2 SP1

  • Comments 9
  • Likes

The BIG excitement for me in the Server 2008 R2 space is getting Dynamic Memory enabled on my Hyper-V servers. From TechNet:

Dynamic Memory is a new Hyper-V feature that helps you use physical memory more efficiently. With Dynamic Memory, Hyper-V treats memory as a shared resource that can be reallocated automatically among running virtual machines. Dynamic Memory adjusts the amount of memory available to a virtual machine, based on changes in memory demand and values that you specify.

Essentially, instead of allocating a fixed memory amount, I can provide a dynamic range of memory with an upper and lower limit, and let the guest operating system inform the Hypervisor of how much memory it really needs. This can potentially allow you to run more virtual machines, as you will consume actual memory resources much more efficiently.

I am going to talk through an example of the impact this has for me below.

My biggest Hyper-V server has 32GB of RAM. I currently spin 19 VM’s on this box, and consume ~30 GB of physical memory.

image_thumb image_thumb1

This is all pre-SP1 and without dynamic memory.

Once I apply SP1 to the Host, and then update the guest VM’s Hyper-V integration components, I can enable dynamic memory and utilize this new feature for supported operating systems.

**Note – follow the guide on TechNet for the requirements, Windows Server 2008 Standard requires a hotfix applied as well to make use of dynamic memory. Also, if you have Windows 2003 VM’s that were originally hosted on Hyper-V 2008 RTM, then migrated to 2008 R2 Hyper-V, I had to uninstall all the Hyper-V integration components and install a clean SP1 version to get dynamic memory working.

The application of SP1 takes me, on average, ~45-60 minutes to complete on a server.

After that is complete, I can upgrade the Hyper-V Integration components on each guest VM to the SP1 version, or if the guest VM is Windows Server 2008 R2, simply apply SP1 to the guest, which will automatically update the Integration components:

image

 

Once the integration components are in place, I can assign dynamic memory settings, either via SCVMM 2008 R2 SP1 (when released) or directly via Hyper-V:

image

 

The result is a new set of columns in Hyper-V showing me the assigned memory, and the memory demand.

The net result of total memory demand changed from my previous value of 29.8GB to 22GB:

 

image image

 

 

That is 8GB of memory freed up on the host, or a 27% decrease in memory utilization.  Since my average memory consumption per VM in my lab is around 1.2GB, that allows for at least 6 more VM’s on this server, which is a 30% increase in density.  That is significant!

Comments
  • Hi Kevin, is running Ops Mgr 2007 R2 components on Windows Server 2008 R2 SP1 officially supported yet? Thanks.

  • @NJC1 - Not as of today.  The typical support announcement is made within 90 pays post RTM of any new version or service pack.  This gives enough time for testing to ensure we dont need to require hotfixes or CU's in order to support a new OS, SP, SQL version, or SQL SP.

  • Hey Guys,

    I have two Hyper-v hosts (Windows 2008 R2 Core Datacentre Edition and another Windows Server Hyper-v 2008 R2). I've installed SP1 on both hosts and a number of the guest VMs on them, including the VMM server (Windows 2008 R2 standard) but I'm not seeing the Dynamic Memory options under "Properties -> Hardware -> Memory". Is there a command or something I need to run in order to get this to show up?

    I'm positive that SP1 is installed on all the machines, and all of the hosts and VMM server is 2008 R2, including the guest VMs. Help!

  • @Tim -

    SCVMM does not support Dynamic Memory yet - this will ship in SCVMM 2008 R2 SP1 - which is due out any day now.  You will only see dynamic memory options in the hYper-V console of an upgraded server right now.

  • I'm seeing some VMs requesting more memory than the Max.  How is this possible if the VM shows Physical Memory matching the Max configured on the Memory Settings?  

  • Glenn that is by design.  That means the OS is potentially starving for memory... and requesting more than what is currently allocated.  This will show up in the "demand" view.  The allocated will be at max, and the OS will report is has "max" memory value.... but Hyper-V is showing us that the OS is actually demanding more.  This results in paging because we dont have enough memory allocated for what the applications running on the OS need (or want).  In the image above - you can see I have the same situation - EX10MB1 and EX10MB2 are both demanding WAY more memory than allocated as max - because Exchange 2010 needs a LOT of memory, even for a fairly small environment.  They are under-allocated and will not perform as well as they could because of this.

  • I notice no demand notice for Ubuntu, does Ubuntu not support dynamic memory?  I tried on my system and i couldn't get it to change, even when setting limits down to 128MB for a system that required 2GB.  This sucks, as I'd like to free up ram if its not being used.

    Thanks.

  • You have Warnings and Low warnings ?

  • Is there any way to get that Memory Demand column entry displayed on 2012 / Win 8 Hyper-V? I see it's listed when selecting the individual VM's, but the old 2008 way shown above does look way more useful. Have checked the Add/Remove Columns but there's nothing available there to be added.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs