Summary: Memory is a critical resource to Microsoft SQL Server workloads, especially in a virtualized environment where resources are shared and contention for shared resources can lead to negative impact on the workload. Windows Server 2008 R2 SP1 introduced Hyper-V Dynamic Memory, which enables virtual machines to make more efficient use of physical memory resources. Hyper-V Dynamic Memory treats memory as a shared resource that can be reallocated automatically among running virtual machines. There are unique considerations that apply to virtual machines that run SQL Server workloads in such environments. This document provides insight into considerations and best practices for running SQL Server 2008 R2 in Hyper-V Dynamic Memory configurations on Windows Server 2008 R2 SP1.

I am not SQL Expert but I will try to provide any hints or comments on this Whitepaper

Like this:

Windows 2008 R2 Sp1 is almost ready for RTM and day after day it get more happy news for VDI fans.

Windows 2008 R2 SP1 comes with two new features. The first and most important is called Dynamic Memory, and as the name suggests, this is a feature of Hyper-V R2 SP1 that will allow for memory on virtual machines to be dynamically scaled up and down as workloads dictate. Right now, memory is allocated statically and a Hyper-V virtual machine – and all of the software running inside of it – has to be rebooted if more memory is needed for that VM’s software stack.

The other new feature coming out with Windows Server 2008 R2 SP1 is called RemoteFX, which is virtualized graphics and media-processing capability that Microsoft picked up with its acquisition of Calista Technologies more than two years ago. What Calista was peddling when Microsoft bought it for an undisclosed sum was software that allowed server-based VDI to give end users sitting at fat or thin clients at the other end of the LAN a visual and audio experience that seemed like it was being rendered locally on a PC with a certain amount of muscle (even if it wasn’t).

9. Run the Upgrade System Center Virtual Machine Manager 2008 R2 wizard to upgrade instances of the VMM Administrator Console and the VMM Self-Service Portal on any other computers that will communicate with the upgraded VMM server

10. After upgrading VMM, all hosts and library servers must be refreshed to show the correct status. To perform a manual host refresh, in the upgraded Administrator Console, in Hosts view, select one or more hosts, and then, in the Actions pane, click Refresh. You can check the status of the host refresh in Jobs view.

11. After a host has been refreshed, it will have a status of Needs Attention, except for the VMM server if it is also serving as a host. This is because the stand-alone hosts still have the previous version of the VMM agent installed. These hosts are fully functional, so you do not have to immediately update the agents on all hosts.

12. To update the hosts, in the VMM Administrator Console, in Hosts view, select one or more hosts with a status of Needs Attention, and then in the Actions pane, click Update Agent.

You can check the status of the agent update in Jobs view. When the refresh is complete, the host status will be OK.

13. To perform a manual library refresh, open Library view, select one or more library servers, and then, in the Actions pane, click Refresh. If you do not perform a manual refresh, the default library refresh interval is 1 hour. You can check the status of library refreshes in Jobs view.

14. After the library refresh, in the VMM Administrator Console, navigate to Administration view, and then click Managed Computers.

15. Select one or more computers that have a role of Library and an agent status of Upgrade Available, and then, in the Actions pane, click Update Agent.

When the update is complete, all stand-alone library servers will have a version status of Up-to-date. For a highly available library server, the version status of each cluster node is updated after the next library refresh.

What is Dynamic Memory?

Dynamic memory overview

Dynamic memory allows you to configure a virtual machine so that the amount of memory assigned to the virtual machine is adjusted while the virtual machine is running, in reaction to the amount of memory that is actually being used by the virtual machine. This allows you to run a higher number of virtual machines on a given physical computer. It also ensures that memory is always distributed optimally between running virtual machines.

Before enabling dynamic memory in a virtual machine you need to ensure that the latest version of integration services is installed in the virtual machine.You can then enable dynamic memory for a virtual machine using the memory settings under the virtual machine settings. Once dynamic memory is enabled there are four parameters that you can configure:

Initial memory.
This is the amount of memory that is required to start the virtual machine. This value needs to be high enough to allow the guest operating system to boot, but should be as low as possible to allow for optimal performance with dynamic memory.The virtual machine will never be assigned less memory than the initial memory value.

Maximum memory.
The virtual machine will not be allowed to use more memory than is specified by this value. This value can be configured anywhere from the initial memory value up to 64GB.

Memory buffer.
The memory buffer value indicates how much memory is assigned to the virtual machine when compared to the amount of memory actually needed by the applications and services running inside the virtual machine.
The memory buffer will not be maintained if there is not enough physical memory available in the computer to give every virtual machine its requested memory buffer.

Memory priority.
The memory priority value reflects how memory will be distributed amongst virtual machines if there is not enough physical memory available in the computer to give every virtual machine its requested amount of memory.
Higher priority virtual machines will be given more memory when compared to lower priority virtual machines with similar settings.

Supported guest operating systems

Dynamic memory is supported for the following guest operating systems:

Windows Server 2008 R2 Enterprise Edition (32-bit and 64-bit)

Windows Server 2008 R2 Datacenter Edition (32-bit and 64-bit)

Windows 7 Ultimate Edition (32-bit and 64-bit)

Windows 7 Enterprise Edition (32-bit and 64-bit)

Windows Server 2008 Enterprise Edition (32-bit and 64-bit)

Windows Server 2008 Datacenter Edition (32-bit and 64-bit)

Windows Vista Ultimate Edition (32-bit and 64-bit)

Windows Vista Enterprise Edition (32-bit and 64-bit)

Windows Server 2003 R2 Enterprise Edition (32-bit and 64-bit)

Windows Server 2003 R2 Datacenter Edition (32-bit and 64-bit)

Windows Server 2003 Enterprise Edition (32-bit and 64-bit)

Windows Server 2003 Datacenter Edition (32-bit and 64-bit)

If you enable dynamic memory for a virtual machine that is running an operating system that is not on this list, the guest operating system will only be able to access the initial memory.

For each supported operating system you should follow the published required and recommended memory values prior to installing the latest integration services and enabling dynamic memory. Once dynamic memory is enabled you can use a lower initial value in order to get the best performance out of dynamic memory. The maximum memory value should always be greater than the required memory for the operating system that is running in the virtual machine.

Operating System

Required Memory

Recommended Memory

Initial Memory (with DM enabled)

Windows Server 2008 R2 Enterprise Edition

512MB

N/A

512MB

Windows Server 2008 R2 Datacenter Edition

512MB

N/A

512MB

Windows 7 Ultimate Edition

1GB

N/A

512MB

Windows 7 Enterprise Edition

1GB

N/A

512MB

Windows Server 2008 Enterprise Edition

512MB

1GB

512MB

Windows Server 2008 Datacenter Edition

512MB

1GB

512MB

Windows Vista Ultimate Edition

512MB

1GB

512MB

Windows Vista Enterprise Edition

512MB

1GB

512MB

Windows Server 2003 R2 Enterprise Edition

128MB

256MB

128MB

Windows Server 2003 R2 Datacenter Edition

512MB

1GB

128MB

Windows Server 2003 Enterprise Edition

128MB

256MB

128MB

Windows Server 2003 Datacenter Edition

512MB

1GB

128MB

Tuning dynamic memory for best performance

If you enable dynamic memory on a virtual machine and are not satisfied with the performance that you receive from the virtual machine, there are multiple configuration changes that you can make to potentially improve performance:

Increase the size of the page file inside the guest operating system.
A larger page file inside the virtual machine allows larger amounts of memory to be added to the running virtual machine if it is needed suddenly. It also lets the virtual machine run better when the availability of physical memory is limited.

Increase the memory buffer configured for the virtual machine.
Increasing the memory buffer will result in more memory being assigned to the virtual machine when compared to the amount of memory actually needed by the applications and services running inside the virtual machine. This extra memory can then be used for file caching purposes, and may help with the performance of IO intensive applications and services.

Increase the initial memory for the virtual machine.
Some applications assign fixed amounts of memory based on the amount of memory available when the application first starts. These applications will perform better with higher values for the initial memory.
Alternatively, if you are seeing poor performance due to too much memory being removed from the virtual machine, increasing the initial memory value can also alleviate this problem.
It should be noted that by increasing the initial memory value, the overall flexibility and effectiveness of dynamic memory is reduced.

Host Reservation

Virtual Machines with Dynamic Memory enabled could consume all memory on the host, leaving nothing for the parent partition. That’s why we have a new registry key:

This is a very important question… When SCVMM will support Dynamic Memory feature introduced in Windows 2008 R2 SP1 Hyper-V server?

There is less public information about the new features that integrated with Windows 2008 R2 SP1 so far, So I had to check with MS private newsgroup.

Brandon for newsgroup came back with this answer ” I had consulted our SCVMM product team and the answer I got is there will be a “feature pack” for SCVMM 2008 R2 that will add-in the capability to manage the new Dynamic Memory feature coming in Windows Server 2008 R2 SP1. Our product team will try to RTM SCVMM package very shortly after the RMT date of Windows 2008 R2 SP1. There will be no SCVMM support for pre-release builds of Windows 08 R2 SP1 until the RC milestone. ”

Service Pack 1 for Windows 7 and Windows Server 2008 R2 will be released “within the first half of calendar year 2011,” Microsoft announced this week.

The service pack is currently available as a beta for test purposes, having been released earlier this month. However, this week, Microsoft published a FAQ on the SP1 beta, which disclosed the approximate product release date for the service pack, perhaps for the first time.

About Zeros & Ones

Hi, I’m Mohamed Fawzi and I am working as Senior Infrastructure System Engineer for LINK development company. This blog covers Virtualization technology and Cloud Computing.
*All the usual disclaimers are applied :)
The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.