Q. What's Memory Priority in Hyper-V R2 SP1 dynamic memory?

A. Many of Hyper-V R2 SP1's dynamic memory features are intended to be set-it-and-forget-it type capabilities. As you learned here, most environments can safely keep Startup RAM and Maximum RAM settings at their default settings. You also learned here that you'll probably set a buffer size as you build a virtual machine (VM), only changing it if you experience excessive paging.

There's a final VM configuration setting of importance inside the Hyper-V Manager:  Memory Priority. This value gets more important as the level of actual memory usage on a host goes up. Recall that dynamic memory will dynamically add and remove memory from VMs as their workloads require it (or no longer require it). This adding and removing of memory is intended to automatically right-size a VM's level of RAM to what it actually needs, rather than whatever arbitrary value assignment its administrator may have assigned statically.

The situation can arise, however, where memory that's currently assigned to one VM is needed by another. This can only happen once all the available physical memory on the system has been allocated to VMs. This memory contention scenario means that the one VM's memory needs can only be satisfied by taking memory from another VM.

Memory priority lets you identify which of your VMs are more important than others. Hyper-V's memory balancer will respect priority levels, only taking memory from VMs that have a lower priority when no free memory is available.

This setting is great if you have high-priority VMs such as an Exchange server or production database that absolutely must have the best performance. If a contention situation occurs, memory can be taken from a lower-priority server to fulfill the needs of the high-priority server.

Be aware, however, that this setting can also be very powerful. If you set priorities incorrectly, you might find that the wrong server is losing memory when it needs it the most.

Any time memory is removed from a VM that needs it, that VM will be forced to swap its memory to disk, significantly reducing its performance. So the situation where memory priority settings need to be reviewed is one that you want to avoid whenever possible.

Adding additional physical RAM to a server, or adding new servers to a Hyper-V cluster, is a much better solution for preserving performance. But for those rare incidents when too many VMs need too much RAM, this setting can help you ensure your high-priority VMs stay happy.

Catch up with @ConcentratdGreg on Twitter!

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.