Post on 20-Jul-2018
Virtualization
Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved. Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved.
To accelerate gains in IT efficiency and
cost savings, organizations are highly
focused on virtualizing systems for
optimal hardware utilization of shared
processor, memory, and storage resources. System
memory dramatically affects performance, so it is
usually sized to help ensure acceptable response
even at peak workloads, however infrequent they
may be. When virtual machine (VM) workloads
vary at different times or rates, the capability to
dynamically add and remove memory from the
VMs enables organizations to meet on-demand
requirements and maximize the use of hardware
resources without compromising performance.
To address this growing need, Microsoft introduced
the Dynamic Memory (DM) feature in the Hyper-V
virtualization hypervisor as part of Windows Server 2008
R2, Service Pack 1 (SP1). The DM feature allows a VM
to draw upon and release memory based on priority
settings and specific VM OS or application requirements.
At the same time, it provides the ability to control the
minimum and maximum memory allotted to a VM and
also the priority of a VM to get memory from the host’s
memory pool during peak periods.
48 2011 Issue 02 | dell.com/powersolutions
Delivered as part of SP1 for the Microsoft® Windows Server® 2008 R2
OS, the Dynamic Memory feature heightens memory efficiency for the
Microsoft Hyper-V™ hypervisor—enabling increased VM density and
hardware utilization when VM workloads fluctuate.
By Barun Chaudhary and David Waggoner
Boosting virtualization performance with flexible memory configurations
dell.com/powersolutions | 2011 Issue 02 49
Virtualization
Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved. Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved.
Setting up Dynamic Memory
The DM feature requires no additional hardware
beyond typical Hyper-V requirements. This
complimentary enhancement is available to
deployed servers after a Windows Server 2008
R2 SP1 upgrade has been completed on the host
machine. Figure 1 lists guest operating systems
for which DM may be enabled.
Making sure each legacy guest OS is
updated to support DM is important. Both
32- and 64-bit versions of guest operating
systems are supported. Organizations with
Microsoft System Center Virtual Machine
Manager (SCVMM)–managed environments
should also confirm SCVMM is at the right
service pack level to comprehensively support
DM, based on the following guidelines:
• Before SP1 release, VM memory was allocated
during creation and would not change unless
the VM was powered off and the static settings
were changed.
• After SP1 release, static memory remains
the default, but it can be replaced by the
DM setting. To enable DM, the VM must
be powered off, and the DM parameters
configured from VM settings. Right-click
the VM, then select Settings and navigate to
memory options (see Figure 2).
Startup RAM is the basic starting memory
for each VM. This value should be the minimum
memory recommended by Microsoft for
individual VMs, depending on the guest OS in
use. For the guest operating systems listed in
Figure 1, Microsoft-recommended minimum
startup RAM settings are as follows:
• 128 MB for Windows Server 2003–based systems
• 512 MB for Windows Vista® and subsequent
operating systems
If DM is inadvertently enabled on a VM
running a non-DM-capable guest OS, the startup
value is treated as a static setting; however,
problems may occur, so enabling DM in this case
is not recommended.
Maximum RAM is the highest value to which
the VM memory can expand. By default, this
setting is 64 GB—the maximum supported VM
memory value. However, it is not useful to set this
value higher than the guest OS limit because that
limit cannot be exceeded. For example, Windows
Server 2008 R2 Standard is limited to 32 GB, so
setting a higher maximum RAM value has no
effect on the guest OS. When the VM is running,
the following settings can be adjusted:
• Memory buffer: This setting enables the host
to keep a cushion of RAM assigned to address
quick spikes, because the DM adjustment is
not instantaneous.
• Memory weight: This setting communicates to
the host the VM’s priority for memory resources
when there is contention. A best practice
is to carefully consider the memory weight
setting on mission-critical VMs—for example,
a runaway application may cause significant
Guest operating systems for VMs Version
Windows Server 2008 R2 with SP1 Standard, Enterprise, Web, and Datacenter
Windows Server 2008 R2 RTM* Enterprise and Datacenter
Windows Server 2008 SP2* Standard, Enterprise, Web, and Datacenter
Windows Server 2003 R2 SP2* Standard, Enterprise, Web, and Datacenter
Windows Server 2003 SP2* Standard, Enterprise, Web, and Datacenter
Windows 7 with SP1 Enterprise and Ultimate
Windows 7 and Vista SP2* Enterprise and Ultimate
* Requires updating Hyper-V integration services and installing Microsoft Quick Fix Engineering (QFE) update KB2230887 for the Standard and Web editions of Windows Server 2008 R2 SP2. For details, visit support.microsoft.com/kb/2230887.
Figure 1. Operating systems in which DM can be enabled
Dynamic Memory and other SP1 benefits
Windows Server 2008 R2 SP1 offers robust features and enhancements. Listen to Oliver Rist of the Microsoft Windows Server team discuss DM and other key features of the SP1 release in this TechNet podcast.
bit.ly/mCyKpD
50 2011 Issue 02 | dell.com/powersolutions
Virtualization
Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved. Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved.
memory utilization in a particular VM,
resulting in the host trying to reallocate
memory away from certain critical VMs
to support those machines with a higher
priority. If all VMs are left at their defaults,
the host may select an undesired VM to
protect if memory becomes constrained.
Defining Dynamic Memory
Similar to the Hot-Add Memory1 support
already available on certain Windows
Server versions, updated integration
services allow the hypervisor to
communicate directly with the enlightened
guest OS memory manager through a
synthetic driver—but with substantially
enhanced flexibility. The Microsoft Hyper-V
host monitors the VM’s memory usage
and demands, and provides additional
memory to the VM based on priority
settings and overall host workload. When
the host needs to reclaim memory, it
triggers a balloon driver that starts to
occupy memory in the guest—using the
same mechanism a regular driver uses
to allocate memory. Once occupied, the
driver locks that memory in the guest, so
that nothing else can access it, and reports
to the hypervisor that it can reallocate that
space. The memory is then reassigned
based on priority and/or demand.
Testing Dynamic Memory
As a Microsoft Premier Partner, Dell has
been involved with early builds of SP1 to
validate this feature on a wide range of
Dell™ PowerEdge™ servers designed for
real-time applications. Dell servers that
support Microsoft Hyper-V are capable of
supporting the DM feature without added
cost or hardware. Advanced systems
such as the Dell PowerEdge R810 rack
server, PowerEdge M915 blade server, and
PowerEdge R815 rack server—all supporting
up to 512 GB RAM—are designed to
provide an easy, optimized way to set up a
high-density data center. The DM feature
was tested on a variety of servers, memory
configurations, and storage to evaluate the
feature and ensure it behaves consistently
across these servers. One test of DM by Dell
engineers at Dell Labs in March 2011 on a
server with medium memory configuration
produced the example results that follow.
On a PowerEdge T610 system with
the Intel® Xeon® E5530 processor at
2.40 GHz, 8 GB of physical memory, and
running Windows Server 2008 R2 SP1 as
the host OS, two VMs were created with the
Windows Server 2008 R2 SP1 OS.
In the first test, each VM was
configured with a static memory of
1,024 MB, as well as a dynamically
increasing load set to consume system
memory. Regardless of the workload in
the VMs, the memory assigned to each
VM was limited to 1,024 MB—represented
by the blue line in Figure 3—to a collective
total of 2,048 MB, resulting in performance
impact on the load.
In the second test, DM was enabled
on each of the VMs with the following
parameter configuration:
• Startup RAM – 1,024 MB
• Maximum RAM – 6,000 MB
• Memory buffer – 20 percent
• Memory weight – 50 percent
When the same load as in the first
test was applied to both VMs—memory
assignment for each is represented by
the green and red lines in Figure 3—the
collective memory assignment for both—
represented by the orange line in Figure 3—
grew to approximately 7,000 MB, enhancing
Figure 2. Virtual machine memory settings for enabling DM
1 For details on Hot-Add Memory, see msdn.microsoft.com/en-us/windows/hardware/gg487553.
dell.com/powersolutions | 2011 Issue 02 51
Virtualization
Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved. Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved.
utilization of the host’s physical memory
(see Figure 3). These example test scenarios
indicate that with the increase in load, VM
memory utilization increases, leading to the
assignment of additional memory to the
VMs. When the VMs reach their maximum
memory assignment, their shares both
remain steady until one VM’s load decreases
and the host starts reclaiming memory—
while reallocating memory to the other VM
to handle the increasing load.
Figure 4 shows the significance and
behavior of memory weight, which
defines the priority for VM memory
assignments. Both VMs were configured
with 1,024 MB startup RAM, 6,000 MB
maximum RAM, and 20 percent memory
buffer, and both were set with the same
increasing load. In addition, VM-1 was
configured with 75 percent memory
weight, and VM-2 was configured with
25 percent memory weight.
With a growing load, both VMs
showed similar memory utilization until
they reached the maximum physical
limit in the system, approximately
7.5 GB total. Because the load in both
VMs continued to demand more memory,
once the maximum value was reached the
hypervisor began to reassign memory—
providing increased memory to the VM
with the higher memory weight, VM-1,
and drawing it from the VM with the lower
memory weight, VM-2—while maintaining
the collective usage at the same level,
approximately 7.5 GB.
Scaling memory on demand
The primary advantage of DM is the
ability of the hypervisor host to scale
the VM memory to support fluctuating
demand. Increasing memory on demand
enhances performance within the VM
and resident applications. Figure 5
shows a comparison of the memory
utilization and hard faults that can occur
within a VM with static versus dynamic
memory settings.
In a hard fault scenario, the system
tries to locate a memory address that has
been paged out to the disk and is not
present in the physical memory. Whenever
a hard fault occurs, the system has to
load the memory content from the disk to
physical memory, which can significantly
impact performance. As shown in the
last graph of each snapshot in Figure 5,
hard faults become prominent during
heavy system memory usage and when
maximum memory utilization suddenly
drops. With static memory set, hard faults
were prominent, contributing to sluggish
behavior of the application running within
the VM. In contrast, with dynamic memory
set, hard faults decreased significantly,
enhancing the VM’s performance.
Figure 3. System memory utilization with static and dynamic memory
Figure 4. Memory assignment for VMs having different memory weight with DM
8,000
7,000
6,000
5,000
4,000
3,000
2,000
1,000
0
Mem
ory
uti
liza
tio
n (
meg
abyt
es)
Load in VM
0 5 10 15
Static memory (per VM)
VM-1 (dynamic memory)
VM-2 (dynamic memory)
Total system memory utilization (dynamic memory)
8,000
7,000
6,000
5,000
4,000
3,000
2,000
1,000
0
Mem
ory
uti
liza
tio
n (
meg
abyt
es)
Load in VM
0 5 10 15 20
VM-1 (memory weight—75 percent)
VM-2 (memory weight—25 percent)
Total system memory utilization
52 2011 Issue 02 | dell.com/powersolutions
Virtualization
Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved. Reprinted from Dell Power Solutions, 2011 Issue 2. Copyright © 2011 Dell Inc. All rights reserved.
Accelerating virtualization cost-efficiencies
with Dynamic Memory
The Microsoft Hyper-V DM feature provides
efficient, on-demand memory scaling to
dynamic and changing IT requirements. DM
offers a beneficial, easy-to-use, cost-free
addition to the Hyper-V hypervisor feature set,
and is suitable for a wide range of organizations
from small businesses to large enterprise data
centers. By ensuring that particular applications
are supported for DM,2 and configuring
memory weight settings to match VMs with
their correct priorities, organizations can use
DM to realize increased hardware utilization,
which can be a critical component of a
successful virtualization strategy.
Figure 5. Comparing static memory and dynamic memory utilization in the VM
2 For an overview of system requirements, see the Hardware Virtualization section of “Exchange 2010 System Requirements” at technet.microsoft.com/en-us/library/aa996719.aspx.
Static memory
utilization
Dynamic memory
utilization
Authors
Barun Chaudhary is a software engineer on the
Dell Enterprise Server Operating System team,
specializing in Windows Server virtualization and
networking technology.
David Waggoner is a technologist on the Dell
Enterprise Server Operating System team, specializing
in Windows Server and other Microsoft technologies.
Learn more
Hyper-V Dynamic Memory Configuration Guide:
bit.ly/mcNX2b
Hyper-V and Dynamic Memory in Depth:
bit.ly/kUUsbu