TechOnTip Weblog

Run book for Technocrats

Windows 2008 R2 SP1 – Dynamic Memory

Posted by Brajesh Panda on May 9, 2011

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

  1. System Requirements
    1. Install Windows 2008 R2 Service Pack 1 on Hyper-V Server – Reboot
    2. Install Service Pack 1 & new SP1 version Integration pack on Windows 2008 R2 & Windows 7 Virtual Machines – Reboot
    3. Install Security Hot fix KB2230887 & New SP1 version Integration pack on Windows 2008 SP2 Virtual machines – Reboot
    4. Upgrade (Install) Hyper-v Integration Software on Windows 2003 virtual machines – Reboot
    5. Shutdown Virtual Machine & Configure Dynamic Memory i.e. Startup RAM & Maximum RAM for the Virtual Machine.

Dynamic Memory Config

  1. Right Click virtual machine, go to settings, click on Memory; you will able to see Dynamic Memory details i.e.


Startup RAM: How much memory required for this virtual machine to boot up?

Maximum RAM: What is the maximum memory this virtual machine should scale up to in case demanded?

Memory Buffer: What is the % of physical memory on the top of the CURRENT Memory Demand this hyper-v should reserve for this VM? It can be defined between 5-2000%.


Memory Weight: Define priority of virtual machine to get their share of memory in-competition with other virtual machines When there is less physical memory available in the server for operation.

Dynamic Memory Usage Monitoring

  1. You will able to see 3 new Information tabs in the Hyper-V GUI;

    Assigned Memory:    How much memory has been assigned to this virtual machine?
    Memory Demand:    How much memory this machine needs to perform correctly; as per running workload!
    Memory Status:    It represents the memory assigned status; When VM is configured with Dynamic Memory & running; it presents three statuses i.e. OK, Warning, Low.


Assigned Memory = Memory Demand + (Memory Demand x Memory Buffer/100)

As per above formula if VM is assigned all of memory demand & memory buffer, Memory Status reports as OK.

As per above formula if VM is assigned all of memory demand & part of memory buffer, Memory Status reports as Low.

As per above formula if VM is assigned part of memory demand, Memory Status reports as Warning. This is the time when virtual machines will be experiencing performance issue. Because due to lack of physical memory it will start paging to it’s hard drive.

Here is an example;

Below VM’s Memory Demand is 2079 & Memory buffer is 5%. So theoretically Hyper-v should assign 2182.95MB (2079+(2079×5/100)) of memory. And we can see Hyper-v assigned the same to the VM.

Now to simulate more memory demand, I have elevated the buffer value to 2000%. It mean’s Hyper-v should allocate 41580MB memory. But as per available physical memory in hyper-v server, it pulled out 9000MB to assign the VM.

But assigned value is still below than the demand, so memory status went to Low.

If you want to simulate Warning, you can elevate all virtual machines maximum memory to 65536, it will allow all virtual machines to grab as much as memory available from the server, if usage of all virtual machines are high you will observe the same.

Or you may like to reserve a high amount of memory for the Hyper-v host using memory reserve concept (discussed below), so less physical memory will be available for virtual machines & they will report warning.

  1. If you like to see what is the current memory demand or how much assigned or how much committed etc. Never
    use traditional Windows TASK MANAGER inside the Virtual machine. Only refer to hyper-v GUI.

    Here is a screenshot which may clear your doubt; In Hyper-V Gui it is reporting Memory Demand is 2130MB & Assigned Memory is 2219MB. However Task manager is reporting 12945MB.

    Actually this 12945MB is the maximum amount of memory assigned to this VM till when it is started. Dynamic Memory driver inside the VM never release/update the same value for task manager.


  1. Here are some new performance counters for Dynamic Memory in the hyper-v server to track server/virtual machine usage!


  1. Memory Reserve is a new registry key has been released with Service Pack 1 to reserve certain amount of memory for the hyper-v host itself. Sometime people end up using all available physical memory in the server for Dynamic Memory, leaving no memory for the parent domain host i.e. hyper-v host itself. And management work from this partition face issues due slow response. In this case you may like to reserve certain amount of memory for the host itself. You have to create a REG_DWORD value & reboot the server for its effectiveness

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization

    RED_DWORD value

    Name = MemoryReserve

    Define the value in Decimal, reserve will be in MB.


Advertisements

One Response to “Windows 2008 R2 SP1 – Dynamic Memory”

  1. […] in them. I was only concentrating on integration pack. Then I referred to my old dynamic memory notes & realized SP1 need to be installed on them. Seems like as these are test virtual machines my […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: