Q. How should I set the Memory Buffer with Hyper-V R2 SP1's dynamic memory?

A. Hyper-V R2 SP1's new dynamic memory feature is a fantastic tool for ensuring the right amount of RAM is automatically available for virtual machines (VMs). Once it begins dynamically adjusting assigned VM RAM, its memory balancer will assign each VM enough RAM to process its needed workload.

One characteristic that you can tune with dynamic memory is the Memory Buffer. This setting is found in the Hyper-V Manager by viewing the memory settings of a VM. In the box marked Memory Management, you'll find a slider for increasing or decreasing the percentage of memory that's reserved as a buffer for the VM.

The memory buffer represents an added amount of RAM that's assigned to a VM based on its actual memory needs. For example, if a VM tells its host that it currently needs 1,000MB of RAM, this number represents the actual amount of RAM needed by the VM. If that VM's RAM needs increase by even a tiny amount, the VM will then need to begin swapping memory to disk until the memory balancer can assign more RAM.

That reassignment takes a very small amount of time, but swapping RAM to disk will dramatically affect performance. This is why each VM also includes a configurable quantity of buffer RAM, between 5 and 95 percent of assigned RAM. The buffered RAM is present to assure that a VM will always have a little bit of "extra" RAM, should its requirements change.

The slider in the Hyper-V Manager allows you to adjust how much RAM is used for the buffer. More buffered RAM gives you a greater assurance that you'll never need to swap to disk should a large change in RAM requirements occur. However, more buffered RAM is essentially more wasted, unused RAM. Your mileage will vary, so start conservatively with how you configure this setting.