Powered by System Center
Posts tagged Dynamic Memory
There haven’t been any new blogs on Hyper-V.nu in the past weeks because of …. you know … an absolute dearth of time. It so happened that my other Hyper-V.nu colleagues had the same luxury problem in these economical challenging times.
So while I was doing a lot of other things which I will soon be able to talk about, I asked my colleague Sander Klaassen to fill in the gap and write a guest blog. Sander is also a Microsoft virtualization enthusiast and combines this with his broad other expertise.
Please welcome our guest blogger Sander Klaassen!
Over de last years I developed a script to quickly scan a customer’s IT environment. Recently I added a Hyper-V module which collects data from Hyper-V hosts and VM’s. I showed Hans Vredevoort the output and he asked me to write a blog about it. I was not sure to share the code, because it isn’t very clean, since I only occasionally work on it.
I created a VBScript and not a PowerShell script because I wanted to be able to run it without installing anything, and VBScript is part of windows since Windows 2000 so it’s always available.
This is also the reason why I made this script besides the regular Microsoft scan tools like ACT and MAP. They all need installation of components or even agents.
I modified the script for this blog, I changed the script by requesting input in a text file instead of Active Directory. This text file is a simple list of machine names:
Save it in the same directory as the VBScript with the name “machinelist.txt”
The script queries WMI name spaces of each machine and when it finds the Hyper-V role, it collects the following information:
In Windows Server 2008 and Windows Server 2008 R2 assigning memory to virtual machines is a static process. When you assign 4 GB to a virtual machine it uses these 4 GB, no more, no less. When not all of this memory is used than it’s bad luck. Once assigned it cannot be used for other purposes. So, when you have a Hyper-V host with 32GB of memory, you can create 15 virtual machines each configured with 2 GB of memory. The last 2 GB will be used by the parent partition itself.
New in Windows Server 2008 R2 SP1 is a feature called “Dynamic Memory”. This feature can assign more memory to a virtual machine (while running) when the virtual machine needs more memory. It can also remove memory from the virtual machine when this memory can be used for other virtual machines.
Some people think VMware’s and Microsoft’s approaches to dynamic memory is exactly the same. In this article I explain both the similarities and the differences. Read More….
Dynamic memory is a cool feature in Hyper-V R2 SP1 and let’s you increase the density of VM’s on your Hyper-V Server. In short, the Hyper-V Server can assign memory to VM’s that need it, but ‘take’ it from VM’s that do not need it.
It’s all about the workload of course. Exchange Server 2010 is fully supported to run on Hyper-V, except for the Dynamic Memory part. Exchange Server wants only one thing: allocate as much memory as possible for caching mailbox data. When using Dynamic Memory, Exchange will allocate more memory and the Hyper-V server will allow this. But as soon as the Hyper-V server needs to reclaim memory from the Exchange Server and the ‘balloon starts to inflate’ Exchange Server will suffer performance issues. So from an Exchange point of view it’s better to allocate a fixed amount of memory (plenty of memory) to prevent nasty surprises.
For Microsoft official support recommendations on Exchange Server you might want to check this page: Microsoft Support Policies and Recommendations for Exchange Servers in Hardware Virtualization Environments
And for the dynamic memory part scroll down to “Dynamic Memory Allocation Considerations”
Quote from this article:
“Many of the performance improvements in recent versions of Exchange are based on the efficient use of an appropriately-sized RAM allocation. This is particularly true of improvements that are related to reductions in I/O operations. The performance optimizations rely on Exchange caching data in RAM. When RAM is dynamically reduced, the expected performance of the system cannot be achieved. In this scenario, Exchange may exhibit reduced performance, or end-users may experience reduced performance when connecting to Exchange. Therefore, for virtual machines that are running Exchange in a production environment, it is best to turn off memory oversubscription or dynamic memory allocation. Instead, configure a static memory size that is based on the appropriate values for Exchange 2007.”
The same is true for Exchange Server 2010.
When installing the beta of System Center Virtual Machine Manager 2012 I ran into the problem where the installation needs at leased 2G of RAM. My VM only got a startup amount of RAM of 512MB because of the limit amount of available RAM in the Hyper-V host. Actually I gave the VM the dynamic amount of 512MB to 4GB.
Solution is easy! Shut down the VM, give it a fixed amount of RAM for installing SCVMM2012 Beta and afterwards change it back to the dynamic amount of memory you would like it to use!
Funny that it only needs to see 2Gb of RAM, it doesn’t actually uses it! Also when you address a dynamic range of 2-4Gb memory it will give you an warning message but it will continue installing
I also needed to fix the IIS problem. What I really do not understand that when you start the installer of SCVMM 2012 Beta you are asked if it is ok to install .Net 3.5.1 Framework. Why not do this for IIS also? Might be an option to at least give the option to install the correct version. You also need to install Windows® Automated Installation Kit (AIK) which can be found WAIK.
A full list of the requirements can be found here.
The long wait is over. Microsoft promised Windows Server 2008 R2 SP1 before the end of Q1 2011 and RTM is now formally announced:
Technet/MSDN availability on February 16th
Public availability on February 22nd
Service Pack 1 includes many security updates as well as a bunch of hotfixes which made installing Hyper-V a task that had to be done carefully. With everything included this will save a lot of time.
SP1 also enables enhanced support for how Failover Clustering works with storage that is not visible for all cluster nodes. In SP1, improvements have been made to the Cluster Validation and multiple Failover Cluster Manager wizards to allow workloads to use disks that are shared between a subset of cluster nodes.
There are already many blogs explaining the two most important new features for Hyper-V:
Specifically for Hyper-V it is now possible to control whether NUMA spanning is allowed. If a VM uses memory from more than one NUMA node, performance will suffer. Hyper-V will try to minimize spanning but if there is no other way it will use memory from more than 1 NUMA node. If you want to avoid this at all times just switch off NUMA spanning in the Hyper-V settings of the Hyper-V server. Of course this is more likely to occur with guests that demand a lot of memory. Now that we have dynamic memory it is also more likely that memory is used from multiple NUMA nodes.
J.C. Hornbeck has collected a number of sources on SP1 improvements:
System Center Virtual Machine Manager 2008 R2 SP1 will follow in 30 days after SP1 RTM. So expect it before the end of April 2011
I will not repeat all this but show SP1 in a few pictures:
As from today the release candidate for SCVMM 2008 R2 SP1 is available from Microsoft Connect.
This version supports managing Hyper-V hosts with the new SP1 functionality: Dynamic Memory and RemoteFX.
Hopefully you can still find the SCVMM 2008 R2 SP1 RC section, because moments after I started downloading the package I could not find the dashboard entry for the product in Microsoft Connect
For more details visit Virtual Machine MVP Kurt Roggen’s Blog:
Just got news that SP1 Release Candidate is ready for download:
Today, Microsoft has made available a Release Candidate (RC) for Service Pack 1 for Windows Server 2008 R2 and Windows 7. SP1 includes both a roll-up of operating system updates and several new capabilities for Windows Server.
Microsoft RemoteFX introduces a new set of remote user experience capabilities that enable a media-rich user environment for virtual and session-based desktops. RemoteFX can be deployed to a range of thick and thin client devices, enabling cost-effective, local-like access to graphics-intensive applications. RemoteFX also supports a broad array of USB peripherals to improve the productivity of users of virtual desktops.
SP1 also includes Dynamic Memory, which enables servers running Hyper-V for server virtualization, to be more efficient in the use of memory. Dynamic Memory pools and distributes memory among the virtual machines running on a physical host, enabling higher consolidation ratios, increasing server utilization rates, and providing more flexible workload management. Furthermore, memory is dynamically added based on the demands of the current workloads and without service interruption.
Expect to see Service Pack 1 released in its final form during first quarter 2011 and whether you’re virtualizing servers or desktops, take a few minutes to learn more about Service Pack 1 here. You needn’t wait for SP1, however – you can join those already enjoying the benefits of Windows Server 2008 R2 by deploying today.
The official beta of Windows Server 2008 R2 (and W7) SP1 is now available:
So if you want to test Dynamic Memory and RemoteFX for superb graphical user experience in a virtual machine, here is your chance.
As Ben Armstrong pointed out in his blog that the full choice of supported operating systems will be available with the official version of SP1:
Supported with beta:
Additional support with final version of SP1:
A good explanation of what Dynamic Memory is can be found at:
If you are curious about how Dynamic Memory (DM) is implemented in Hyper-V R2 SP1, go and take a look at Ben Armstrong’s presentation at TechEd 2010 US.
Expect a public beta of Windows Server 2008 R2 SP1 towards the end of July. I can tell you it is a very well architected implementation of Dynamic Memory.
Ben explains how DM works under the covers and what you can expect from SP1.
Adding memory is implemented by a Synthetic Memory Driver (VSP/VSC Pair) which requires an update of the Hyper-V Integrations in the guest partition before it can use DM.
Supported guest operating systems:
Windows Server 2003 (32-bit & 64bit)
Windows Server 2008 (32-bit & 64bit)
Windows Server 2008 R2
Widows Vista and Windows 7 (32-bit & 64-bit only)
Enterprise and Ultimate Editions only
The new memory feature is clearly what it says: Dynamic Memory and NOT Memory Overcommit.
Memory Overcommit means Memory Oversubscription means Paging to the disk means Bad Performance
DM treats memory like Hyper-V treats CPU resources: as a dynamically schedulable resource.
So oversubscribing, NOT overcommitting.
New in SP1 too is the ability to protect the memory Root Reserve. By means of a registry key static memory can be set to reserve memory for the parent partition. This memory cannot be grabbed by guest partitions.
Ben also explains a new NUMA setting in the configuration of SP1 guest partitions.
I will be presenting at ExpertsLive which is held in Nijkerk, the Netherlands on June 16th 2010.
Experts Live is a knowledge event around Microsoft Infra & Security, Unified Communication, Virtualization and Management with Microsoft System Center.
My talk will be called Hyper-V R2 Hotspots zooming in on Hyper V R2 Clusters, Cluster Shared Volumes, Live Migration, Direct I/O, Dynamic Storage, Direct Memory and VHD Tooling.
Proud to say that my company Nobel is one of the main sponsors of the event, along with Citrix and PQR.
The event has free admission but requires registration via http://expertslive.nl/