Today’s post will cover Dynamic Memory in Hyper-V 2012/R2.
This is Part 1 of two parts: Understanding Dynamic Memory.
As you know Physical computers have a static amount of memory, which does not change until you shut down the computer and add additional physical (RAM). The experience with virtual machines is the same as when you do not configure them to use dynamic memory. Virtual machines are assigned the same amount of memory while they are running. However, with Hyper-V, you can configure virtual machines to use dynamic memory, which enables more efficient use of the available physical memory. If you enable dynamic memory, the memory is treated as a shared resource, which can be reallocated automatically between running virtual machines.
Dynamic memory adjusts the amount of memory available to a virtual machine based on memory demand, available memory on the Hyper-V host, and the virtual machine memory configuration. This can make it possible to run more virtual machines simultaneously on the same Hyper-V host. This can be especially beneficial in environments that have many idle or low-load virtual machines such as pooled VDI environments.
For Virtual Machines we have two options:
1- We can use Static amount of memory (We set an amount that is allocated to the virtual machine when starts and it is effectively reserved on the host).
2- We can also enable Dynamic memory (When we enable Dynamic memory, the value set on the Startup RAM: becomes the amount of memory the virtual machine is allocated when it first starts up), but we can also specify a minimum and a maximum amount of RAM.
- Minimum RAM: obviously is what physical memory assign can shrink to… So this can be less what it starts with, the logic here is perhaps you have workload or Operating System that starts initially requires certain amount of memory, but when it has actually started it doesn’t require as much. You can decrease this value while the virtual machine is running.
- Maximum RAM: we can have a maximum amount of RAM, the default is 1TB 🙂 normally we don’t leave this value, but this is the amount of memory that can be added to the virtual machine if it deems it necessary. You can increase this value while the virtual machine is running.
- Memory Buffer: the threshold buffer is by default 20%, but we can change that. This buffer is saying look I want to make sure that always this amount extra memory assigned to the VM above that working set (above the amount that is being used by the processes).
- Memory Weight: in times of contention, we can say what is the priority of the memory for this VM compare to others virtual machines? (Low or High priority).
If we compare Dynamic Memory in the previous Hyper-V version (2K8R2), you can see we cannot decrease or increase the minimum/maximum amount of memory while the VM is running.
In Part 2 we will see Dynamic Memory in action!
So stay tuned, until next time…