Dynamic Memory Architecture & Concepts

Report
Jeff Alexander
IT Pro Evangelist
Microsoft Australia
http://blogs.technet.com/jeffa36
Dynamic Memory
RemoteFX
How much memory does an IIS server actually
need?
Print server?
File server?
Branch Cache?
Direct Access?
How much will performance be affected if you
halved the amount of memory in a VM?
“New virtual machines get 1GB of RAM [no matter what the VM is
running].
“All VMs get 4GB of RAM [I have no idea what is happening with that
memory] and no one complains”
“I take the minimum system requirements and add (insert one: 50%, 100%,
150%)”
“A vendor tells me their app needs 4GB of RAM. I do not have the time to
test this to find out if it is true or not”
Memory
Key factor to the number of running VMs
Possibly most expensive asset in system
Customer Requirements
Improve density, with minimal performance impact
Maintain consistent performance
Don’t provide a feature that’s unsuitable for production
use
Higher VM consolidation ratios with minimal performance
impact
Dependent on:
How much variation in memory utilization the workloads have
How good a job you did of sizing the systems in the first place
Work well for both server and desktop workloads
Add minimal overhead to the system
Pass the “that looks right” test
Adding Memory
Enlightened fashion
Synthetic Memory Driver (VSP/VSC Pair)
No hardware emulation
Lightweight
Removing Memory
Wanted to remove memory
Ballooning is more efficient
Messes up task manager in the guest OS
Benefits
Enables higher consolidation ratios per host by addressing the greatest limiting factor to
consolidation: Memory
A Production feature.
Overview
Memory is pooled and dynamically and securely distributed across VMs
Memory is dynamically added/removed based VM usage with no service interruption
Guest enlightened: guests & Hyper-V work TOGETHER
Finance VM
Sales VM
Engineering VM
8 GB
6 GB
4 GB
3 VMs started
2 GB
T=0
T = 15
Virtual Machines
Memory Settings
T = 30
T=0
T = 15
T = 30
Total System Memory 8 GB
Memory in Use by VMs3 GB
Physical Memory Used 37.5 %
Finance VM
Sales VM
Engineering VM
8 GB
Finance starts reports
Engineering starts an
analysis job
6 GB
4 GB
3 VMs started
2 GB
T=0
T = 15
Virtual Machines
Memory Settings
T = 30
T=0
T = 15
T = 30
Total System Memory 8 GB
Memory in Use by VMs6 GB
Physical Memory Used 75 %
Finance VM
Sales VM
Engineering VM
Service VM
8 GB
Finance starts reports
Engineering starts an
analysis job
6 GB
Engineering reaches
max allocation
Finance report finished
Engineering analysis running
IT starts a Service VM
4 GB
3 VMs started
2 GB
T=0
T = 15
Virtual Machines
Memory Settings
T = 30
T=0
Memory recovered
to allow Service VM
T = 15
T = 30
Total System Memory 8 GB
Memory in Use by VMs7.5 GB
Physical Memory Used 94 %
Parent Requirements:
Windows Server 2008 R2 SP1
Microsoft Hyper-V Server 2008 R2 SP1
Supported Guests:
Windows Server 2003, 2008 & 2008 R2
Enterprise and Datacenter Editions only
32-bit & 64-bit versions
Windows Vista and Windows 7
Enterprise and Ultimate Editions only
32-bit & 64-bit versions
Cache to improve performance
Windows Memory Manager utilizes all free
memory for cache
Guest Applications
VMMS
Memory
Balancer
VMWP
Memory
Balancer
Interface
User
Mode
DM
VDEV /
VSP
WP Memory
Management
Window
s
Windows
Memor
Memory
y
Manager
Manage
r
Windows
Memory
Manager
DM VSC
VID
VMBus
VMBus
Hypervisor
Kernel
Mode
Collect / Send guest memory statistics to the
balancer
Add / Remove memory to the guest
Enlightened Memory Addition
Lightweight & fast
No hardware emulation
Memory Removal by Ballooning
Orchestrate all Hyper-V memory operations
Live Migration Optimization:
Shrink the memory of the VM on the source node
Shorter migration times
VID
Virtualization Infrastructure Driver
Manages the mapping of VM memory => Physical
Memory
Utilizing Windows Memory Manager to clean memory
Utilizing Windows Memory Manager to decrease
fragmentation
Single place for all memory decisions
Calculates Memory Demand
Protects host from resource starvation
Ensures a stable system with minimal operations
Host Reserve
VM Reserve
Host Reserve is automatically calculated based on:
Total memory size of the host
SLAT capability of the host
NUMA architecture of the host
~ 400 MB + (0.03 * Total Memory Size of the host)
Optimally distributed across NUMA nodes
When there is available memory on the host, VMs
get their target memory
Target Memory
Target Memory
Available
Memory
Root
Reserve
Buffer
Buffer
Memory
Demand
Memory
Demand
When there is no available memory on the host, weight is
used to determine memory distribution
Target Memory
Target Memory
Priority
Buffer
Penalty
Root
Reserve
Hyper-V
Host
Memory
Demand
VM1
Low Weight
Priority
Penalty
Buffer
Buffer
Memory
Demand
VM2
Medium Weight
TargetMemory
Priority Penalty
Buffer
Buffer
Memory
Demand
VM3
High Weight
Goal: Stable System / Minimal Overhead
Active memory addition policy
Memory is added immediately when VM needs it
Passive memory reclamation policy
Memory is not removed when there is no immediate
need
Unutilized memory is collected every 5 minutes
Availability is a concept
How much memory does the VM have?
How much memory does the VM want?
The difference is the availability
Priority: which VM gets the memory first
1-10,000: default is 5,000
The higher the priority, the higher the
availability
Hyper-V has always had the concept of a reserve
of memory that is kept for the parent partition
DM allows VMs to push up against the reserve
consistently
New behavior to better protect the parent
partition from rampaging virtual machines
New registry key in place
May result in less memory being available for VMs
Memory Over-Commit (Technology)
General name for VMWare Memory Management
Technologies
Memory Over-Commit (Resource)
Subscribing more memory to your VMs than the
physical memory on the host
VMWare / Microsoft agree:
Memory Resource Over-Commit is a bad thing
What about numbers?
Based on the configuration
What matters is how much memory VM needs?
Login VSI VDI workload demand ~400 / 600 MB
Previous Memory Size = 1 GB; Saving 40%
Previous Memory Size = 2GB; Saving 75%
VMWare:
Doesn’t trust guest information
Users need to guess a memory size
VMs start with large memory values
Then memory is saved (!) with different technologies
Hyper-V
Collaborates with guest
Automatic sizing of VMs
Memory Thin Provisioning
Enhancements to scalability and high availability
when using DirectAccess
addition of support for 6to4 and ISATAP addresses
when using DirectAccess in conjunction with Network
Load Balancing (NLB)
Support for Managed Service Accounts (MSAs) in
secure branch office scenarios
SP1 enables enhanced support for managed service
accounts (MSAs) to be used on domain-member
services located in perimeter networks
Support for increased volume of authentication
traffic on domain controllers connected to highlatency networks
SP1 allows for more granular control of the maximum
number of possible concurrent connections to a
domain controller
TAP program workload list:
SQL / AD / DNS / Print Server / File Server / IIS / LoB
Apps / RDS / Win7 VDI / DA / DHCP / Exchange (NonMailbox Roles) / TMG 2010 / SPS 2010 / App-V / MedV / OCS / FTP / WDS / …
TAP program workloads not utilizing DM:
Linux VMs
Exchange 2010 Mailbox Role
Workloads that require tuning =
Apps doing cache management (SQL / Java / …)
Memory Buffer = 5%
App Minimum Memory < DM Startup Memory
App Maximum memory < DM Maximum Memory
Official SQL Server Statement:
Q7: Is Hyper-V Dynamic Memory supported for SQL Server?
A7: Hyper-V Dynamic Memory is fully supported with SQL Server.
Only SQL Server versions and editions (Enterprise and Datacenter) that support Hot Add Memory can
see memory that is added by using Hyper-V Dynamic Memory. SQL Server versions that do not support
Hot Add Memory are still supported. But these versions will detect only the memory that is present
in the operating system when SQL Server starts. Before you deploy Hyper-V Dynamic Memory, please
read the following resources when you use Hyper-V Dynamic Memory with SQL Server:
Hyper-V Dynamic Memory Evaluation Guide
SQLOS Team Blog - Hyper-V Dynamic Memory
Windows Virtualization Team Blog - Dynamic Memory
Why Enroll, other than it being free?
The Microsoft Virtual Academy helps you to improve your IT skill set and advance your
career with a free, easy to access training portal that allows you to learn at your own
pace, focusing on Microsoft technologies.
What Do I get for enrolment?
•
•
•
Free training to make you become the Cloud-Hero in my Organization
Help mastering your Training Path and get the recognition
Connect with other IT Pros and discuss The Cloud
Where do I Enrol?
www.microsoftvirtualacademy.com
Then tell us what you think.
[email protected]
SQL and Dynamic Memory Configuration
http://blogs.msdn.com/b/sqlosteam/
Virtualization Team Blog
http://blogs.technet.com/b/virtualization/
Dynamic Memory Configuration Guide
http://technet.microsoft.com/enus/library/ff817651(WS.10).aspx

similar documents