41
JUNE 7-10, 2010 | NEW ORLEANS, LA

Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Embed Size (px)

Citation preview

Page 1: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

JUNE 7-10, 2010 | NEW ORLEANS, LA

Page 2: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Hyper-V and Dynamic Memory in DepthBenjamin ArmstrongSenior Program Manager LeadMicrosoft Corporation

SESSION CODE: VIR304

Page 3: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

AgendaUsers, Memory & VirtualizationDynamic Memory

Architecture & ConceptsSystem Impact

Memory Techniques / Competition

Page 4: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Users, Memory & Virtualization

Page 5: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

No one can size VMsHow 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?

Page 6: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

No one wants to size VMs“New virtual machines get 1GB of RAM [no matter what the VM is running]. I only give people more memory if they complain about performance”

“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”

Page 7: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Virtualization & MemoryMemory

Key factor to the number of running VMsPossibly most expensive asset in system

Customer RequirementsMaximum density, without sacrificing performanceMaintain consistent performanceDon’t provide a feature that’s unsuitable for production use

Page 8: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Hyper-V R2 SP1Dynamic Memory

Page 9: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Dynamic Memory GoalsHigher VM consolidation ratios with minimal performance impact

Dependent on:How much variation in memory utilization the workloads haveHow good a job you did of sizing the systems in the first place

Work well for both server and desktop workloadsAdd minimal overhead to the systemPass the “that looks right” test

Page 10: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Adding/Removing MemoryAdding Memory

Enlightened fashionSynthetic Memory Driver (VSP/VSC Pair)

No hardware emulationLight weight

Removing MemoryWanted to remove memoryBallooning is more efficient

Messes up task manager in the guest OS

Page 11: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

System RequirementsParent Requirements:

Windows Server 2008 R2 SP1Microsoft Hyper-V Server 2008 R2 SP1

Windows Server 2003, 2008 & 2008 R232-bit & 64-bit versions

Windows Vista and Windows 7Enterprise and Ultimate Editions only32-bit & 64-bit versions

Page 12: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Dynamic Memory Architecture & Concepts

Page 13: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Dynamic Memory Architecture

Windows Kernel

Guest Applications

VMBus

Hypervisor

VMMS

OSMicrosoft Hyper-V

User Mode

KernelMode

Provided by:

VMBus

VMWP

VID

Memory Balancer

Memory Balancer Interface

GMOMemory Manager

DM VDEV/VSP

DM VSC

Dynamic Memory Components

Windows Kernel

Page 14: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Example0 512 MB

Hot-add

1024MB

Hot-add

VM Memory

Ballooned MemoryVM Memory

Second VM MemoryParent Memory

Page 15: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Startup & MaxStartup: amount of memory to boot VM

BIOS does not know about DMGuest OS may not know about DMDefault: 512MB

Max: don’t let the VM above this amountDefault: 64GB

Page 16: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Availability & PriorityAvailability 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 first1-10,000: default is 5,000The higher the priority, the higher the availability

Page 17: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Memory BufferHow much “free” memory should we try and keep in the VM?

Allows for responsiveness to bursty workloadsCan be used for file cache

“I like to configure my virtual machines so that they have ~20% free memory”

Page 18: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Dynamic MemoryBenjamin ArmstrongSenior Program Manager LeadMicrosoft

DEMO

Page 19: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

System Impact

Page 20: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Changes to Root ReserveHyper-V has always had the concept of a reserve of memory that is kept for the parent partitionDM allows VMs to push up against the reserve consistentlyNew behavior to better protect the parent partition from rampaging virtual machines

New registry key in placeAllows you to reserve static memory for the parent partition

May result in less memory being available for VMs

Page 21: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Changes to NUMA management…Wait – what is NUMA?Why do I care?How does this work today?

Page 22: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

What is “NUMA”?A traditional computer:

Computer

CPU CPU CPU CPU

BUS

Memory

VM VM VM VM

VM VM VM VM

Page 23: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

What is “NUMA”?A NUMA computer:

Computer

CPU CPU CPU CPU

BUS

Memory

VM VM VM VM

VM VM VM VM

Back Channel

Memory

BUS

Node 1 Node 2

Page 24: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Why do I care?VM memory should come from the “local NUMA node”

Computer

CPU CPU CPU CPU

BUS

Memory

VM VM VM VM

VM VM VM VM

Back Channel

Memory

BUS

Node 1 Node 2

Good!

Page 25: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Why do I care?VM memory should come from the “local NUMA node”

Computer

CPU CPU CPU CPU

BUS

Memory

VM VM VM VM

VM VM VM VM

Back Channel

Memory

BUS

Node 1 Node 2

Bad

Page 26: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

How does this work today?Hyper-V tries to get all memory for a virtual machine from a single NUMA nodeWhen it cannot – the virtual machine “spans” NUMA nodesUsers can set preferred NUMA nodes for virtual machines in order to get the best distribution

Page 27: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Changes to NUMA managementDynamic memory can result in more virtual machines spanning NUMA nodes

A virtual machine might start all on one node – but added memory might come from another node

New option to disable NUMA node spanning

Page 28: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Disabling NUMA SpanningMakes the system behave like multiple small computers

Computer

CPU CPU CPU CPU

BUS

Memory

VM VM VM VM

VM VM VM VM

Back Channel

Memory

BUS

Node 1 Node 2

Page 29: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Memory Techniques / Competition

Page 30: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Understanding philosophical differencesMicrosoft

Understands what guest information to useBuilding on top of guest OS knowledge

Trying to get the “best bang for buck” in virtual memory managementVMware

Does not trust guest informationBuilding a “black box” solution

Started with memory swapping, and digging out of the hole

Page 31: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Dynamic Memory, not OvercommitOverloaded Term

Page SharingSecond Level PagingBalloon Type Mechanisms

No one wants to overcommit their resourceYou don’t overcommit other resources (really – you do not)VMware does not want you to overcommit memory (really)

DM treats memory like we treat CPU resourcesDynamically schedulable resource

Page 32: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

External Page SharingHow it works:1. Hash all memory and store it in a table…2. Identify the common hashes and then…3. Perform a bit by bit comparison

What VMware doesn’t tell you…Page Sharing not dynamicCan take hours to share pagesThe largest benefit are zero pagesDoesn’t work with large pages

Page 33: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Second Level PagingMany problems:

Swapping Guest Kernel ResourcesDouble PagingDisks are slow

But it always works…

Page 34: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Other TechniquesGuest directed page sharingMemory compressionAnd on…

We will continue to invest here and work on identifying the best techniques for customer work loads

Page 35: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

What next?

Page 36: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Test the beta – and talk to us!Try Dynamic Memory out – for both server and desktop environments

Let us know how DM is working for youLet us know if you think we have something wrong

Page 37: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Track Resources

Virtualization @ Microsoft: http://www.microsoft.com/virtualization

Hyper-V on TechNet: http://technet.microsoft.com/library/cc753637(WS.10).aspx

Virtualization Team Blog: http://blogs.technet.com/b/virtualization/

Virtual PC Guy: http://blogs.msdn.com/b/virtual_pc_guy

Page 38: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Resources

www.microsoft.com/teched

Sessions On-Demand & Community Microsoft Certification & Training Resources

Resources for IT Professionals Resources for Developers

www.microsoft.com/learning

http://microsoft.com/technet http://microsoft.com/msdn

Learning

Page 39: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Related Content

Breakout Sessions: VIR402- Virtualization FAQ, Tips, and Tricks

Interactive Sessions: VIR09-INT – Virtualization Round Table Discussion

Hands-on Labs: VIR04-HOL – Config and Managing Windows Server 2008 R2 Hyper-V VIR07-HOL – Introduction to Windows Server 2008 R2 Hyper-V

Product Demo Stations: TLC-35 – Server Virtualization

Page 40: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

Complete an evaluation on CommNet and enter to win!

Page 41: Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation SESSION CODE: VIR304

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.