Today SQL Server team published a whitepaper about considerations for Dynamic Memory in SQL Server VMs.
You can download the paper from:
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
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).
Microsoft expects 40% increase in VDI User Density using Dynamic Memory & Hyper-V, but today I saw some tweets about more to come.
“RT @hyperv_r2 "Big news! Hyper-V SP1 increases VMs/logical proc support to 12VMs/LP up from 8VMs/LP! http://bit.ly/9aG6nZ" by #hyperv”
The ratio of Virtual processors per logical processor increased to 12 with Windows 7 VMs
A ratio of 12:1 is supported on Hyper-V in Windows Server 2008 R2 Service Pack 1 when all guest operating systems on the server run Windows 7. Otherwise, the supported ratio is 8:1.
That means more and more conciliation for the VMs more added significant density to all workloads. This would help more customers and push VDI on Hyper-V more and more
VMM 2008 SP1 RC is out, So I think it is the good time to start testing and deploying it. I took the chance and upgrade my test lab to VMM 2008 SP1.
This post provides step-by-step instructions for upgrading to System Center Virtual Machine Manager (VMM) 2008 R2 Service Pack 1 (SP1) from VMM 2008 R2 while retaining your previous VMM data.
1. Log on to the VMM server that is running VMM 2008 R2.
2. On the product media or the location where you saved the Setup files, right-click Setup.exe, and then click Run as administrator.
3. On the Setup menu, click VMM Server to open the Upgrade System Center Virtual Machine Manager 2008 R2 wizard.
4. Review and accept the license terms, and then click Next.
5. On the Confirmation page, verify the list of VMM components that are already installed on this computer. To upgrade all installed VMM components, click Upgrade.
6. On the SQL Server Credentials page, provide credentials that have permission to access and update the VMM database by doing one of the following:
a. To use the same credentials that you are logged on with, click Next.
b. To provide a different set of credentials, select the Use the following credentials check box, type the credentials, and then click Next.
7. The Setup will start updating VMM Server, VMM administration console and Self service portal.
8. On the Completion page, click Close.
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.
16. After upgrading VMM, update Operations Manager integration, if necessary. For more information, see Updating Operations Manager Integration After Upgrading to VMM 2008 R2 SP1 (http://go.microsoft.com/fwlink/?LinkID=199953).
17. Check the new Dynamic memory setting in the VM configurations.
References: VMM 2008 SP1 Documentations
We’re pleased to announce SC VMM 2008 R2 Service Pack 1 RC is now ready for the general public! This release adds support for Dynamic Memory and RemoteFX in Windows Server 2008 R2 SP1 RC.
Since this is a pre-release version, usage of this is limited to test environments.
UPGRADE MATRIX: You can use this SP1 RC to upgrade from 2008 R2 and you will be able to upgrade from this SP1 RC to the SP1 RTM.
Go and get your download there
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:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ Virtualization
- REG_DWORD value
- Name = MemoryReserve
- Setting = amount of MB to reserve for the parent partition, e.g. 2GB RAM.
You must reboot the host after setting this registry value.
Increase the virtual machine memory priority.
Increasing the virtual machine memory priority will ensure that available physical memory is assigned to this virtual machine before being
Source: Windows Server 2008 R2 and Windows 7 Service Pack 1 Test Focus Guide
Updated with Host Reservation
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.
So nothing expected before the first half of calendar year 2011.
Yesterday I got the chance to start testing Windows 2008 R2 SP1 beta on my test servers, I want to share this experience with you.
Now time for guest restart
Now my VM is can understand the synamic memory..I started my VM and kept eye on Hyper-V Console
So I decided to do a small test.. I opened my VM and terminate my SQL process.. and guess what
I will start more testing on different OS with different workloads.. So stay tuned