Dynamic Memory is a feature of Hyper-V that allows memory to be added to and removed from a virtual machine on demand.
All of the Hyper-V Exam Guide and Notes are available.
Some of the references used are below:
- Allows increased consolidation – more virtual machines on the same host due to increased memory use efficiency which is especially useful for VDI environments;
- Introduces a minimum memory setting for a virtual machine which allows memory to be reclaimed from a virtual machine;
Supported Operating Systems
- It’s all a bit of a con but below is a rough guide to what is supported. See Guest Operating Systems that support Dynamic Memory.
- Latest Integration Services required to be supported;
- Windows Server 2003 Service Pack 2 onwards is supported;
- Windows 8 onwards is supported;
- Windows Vista and 7 Enterprise and Ultimate supported;
- Linux is a special case. See Supported Linux and FreeBSD virtual machines for Hyper-V on Windows
Dynamic Memory Changes to a Running Virtual Machine
- Minimum memory can be decreased;
- Maximum memory can be increased;
Dynamic Memory Settings
- The following settings can be configured for a virtual machine:
- The amount of memory the virtual machine just to start.
- Optimal value should be high enough to start and low enough for efficient memory utilisation;
- This is the minimum amount of memory to be allocated to the virtual machine while running;
- Must be between 32MB and Startup RAM;
- Maximum memory that can be allocated to the virtual machine while running;
- Must be between Startup RAM and 1TB;
- Remember a virtual machine will only use the maximum amount of memory the guest operating system supports;
- The percentage of memory that Hyper-V will allocate to the virtual machine over and above what it is currently demanding.
- Helps cope with memory demand spikes;
- When there is not enough physical memory to give each virtual machine it’;s Memory Buffer, then they are not allocated;
- Allows Hyper-V to prioritise which virtual machines should be allocated memory when there is not enough available for all of them;
- Smart Paging uses disk as a temporary ‘memory storage’ when memory is demanded but is not available;
- Smart Paging can / does degrade the performance of the virtual machine;
- To minimise the performance impact, Smart Paging is only used when all of the following occurs:
- The virtual machine is being restarted;
- There is no available physical memory on the host;
- No memory can be reclaimed from other virtual machines running on the host;
- Smart Paging is not used when:
- A virtual machine is being cold-started (ie. started from a shutdown state);
- Oversubscribing memory for a running virtual machine is required;
- A virtual machine is failing over in a cluster;
- When host memory is oversubscribed Hyper-V relies on the paging features of the guest operating system because it is more efficient than Smart Paging;
- Hyper-V removes the Smart Paging memory, and the Smart Paging memory files, after the virtual machine has started. Smart Paging cannot be used again until the virtual machine is restarted;
- Smart Paging is temporary and not expected to last more than 10 minutes;