slide1 l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Required Slide PowerPoint Presentation
Download Presentation
Required Slide

Loading in 2 Seconds...

play fullscreen
1 / 41

Required Slide - PowerPoint PPT Presentation


  • 80 Views
  • Uploaded on

Required Slide. VIR308 Hyper-V and Dynamic Memory in Depth. Name: Bryon Surace Title: Senior Program Manager Name : Senthil Rajaram Title: Senior Program Manager Microsoft Corporation. Agenda. Memory & Virtualization Memory Optimization Techniques

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Required Slide' - lee


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
vir308 hyper v and dynamic memory in depth

VIR308Hyper-V and Dynamic Memory in Depth

Name: Bryon Surace

Title: Senior Program Manager

Name: Senthil Rajaram

Title: Senior Program Manager

Microsoft Corporation

agenda
Agenda
  • Memory & Virtualization
  • Memory Optimization Techniques
  • Hyper-V Dynamic Memory
    • Architecture & Concepts
    • Demo
    • System Impact
  • Q&A
virtualization memory
Virtualization & Memory
  • How much memory does a server actually need?
    • IIS Server?
    • Print server?
    • File server?
    • Branch Cache?
    • Direct Access?
  • How much will performance be affected if you halved the amount of memory in a VM?
no one wants to size vms memory
No one wants to size VMs Memory

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

virtualization memory7
Virtualization & Memory
  • Memory
    • Key Factor to the number of running VMs
    • The most utilized asset in the system, but also a more expensive asset
  • Statistics on resource utilization of workloads
    • CPU 10%
    • Memory 40%
    • Network I/O <5%
    • Disk I/O <5%
  • Customer Requirements
    • Maximum density, without sacrificing performance
    • Maintain consistent performance
    • Don’t provide a feature that’s unsuitable for production use
dynamic memory goals
Dynamic Memory Goals
  • 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
understanding philosophical differences
Understanding philosophical differences
  • Host and Guest Collaborate
    • Understands what guest information to use
    • Trying to get the “best bang for buck” in virtual memory management
  • Host works in Isolation
    • Does not trust guest information
      • Building a “black box” solution
dynamic memory not overcommit
Dynamic Memory, not Overcommit
  • Overloaded Term
    • Over-subscription vs. Over-committment
  • No one wants to overcommit their resource
    • You don’t overcommit other resources (really – you do not)
    • VMware does not want you to overcommit memory (really)
  • Dynamic Memory treat memory like we treat CPU resources
    • Dynamically schedulable resource
ballooning
Ballooning
  • How it works:
    • Increasing the size of the balloon forces the guest to react to memory pressure by releasing unused pages
    • Decreasing the size makes more memory available to the guest

VM

VM

VM

Swap In

Swap Out

Memory

Memory

Memory

Balloon

Balloon

Balloon

Disk

Ballloon

Disk

Disk

Deflate

Deflate

Inflate

Host Computer

Host Computer

Host Computer

second level paging
Second Level Paging
  • How it works:
    • Paging at the virtualization layer by swapping VMs memory out to disk
  • Many problems:
    • Swapping Guest Kernel Resources
    • Double Paging
    • Disks are slow
  • But it always works…
external page sharing
External Page Sharing
  • How it works:
    • Eliminate redundant copies of memory pages common to more than one virtual machine
      • Hash all memory and store it in a table…
      • Identify the common hashes and then…
      • Perform a bit by bit comparison
  • Problems
    • Page Sharing not dynamic
    • Can take hours to share pages
    • The largest benefit are zero pages
    • Doesn’t work with large pages
other techniques
Other Techniques
  • Guest directed page sharing
  • Memory compression
  • And on…
system requirements
System Requirements
  • Parent Requirements:
    • Windows Server 2008 R2 SP1
    • Microsoft Hyper-V Server 2008 R2 SP1
  • Guest Requirements:
    • Windows Server 2003, 2008 & 2008 R2
      • 32-bit & 64-bit versions
    • Windows Vista and Windows 7
      • Enterprise and Ultimate Editions only
      • 32-bit & 64-bit versions
adding removing m emory
Adding/Removing Memory
  • Adding Memory
    • Enlightened fashion
      • Synthetic Memory Driver (VSP/VSC Pair)
    • No hardware emulation
    • Light weight
  • Removing Memory
    • Wanted to remove memory
    • Ballooning is more efficient
      • Messes up task manager in the guest OS
dynamic memory architecture

Provided by:

Dynamic Memory Architecture

OS

Microsoft Hyper-V

Dynamic Memory Components

Guest Applications

VMWP

DM VDEV/VSP

User Mode

Memory Balancer Interface

VMMS

Memory Balancer

GMO

Memory Manager

Windows Kernel

Windows Kernel

Kernel

Mode

DM VSC

VID

VMBus

VMBus

Hypervisor

adding removing m emory20
Adding/Removing Memory
  • Active Memory addition
    • Memory is added immediately when VM needs it
  • Passive Memory reclamation
    • Memory is not removed when there is no immediate need
    • Unutilized memory is collected every 5 minutes
startup max
Startup & Max
  • Startup: amount of memory to boot VM
    • BIOS does not know about DM
    • Guest OS may not know about DM
    • Default: 512MB
  • Max: don’t let the VM above this amount
    • Default: 64GB
controlling memory availability
Controlling Memory Availability
  • Availability is a concept
    • How much memory does the VM have?
    • How much memory does the VM want?
    • The difference is the availability
  • Mechanisms in place to control Memory Availability through Buffer and Priority settings
memory buffer priority
Memory Buffer & Priority
  • Buffer: How much “free” memory should we try and keep in the VM?
    • Allows for responsiveness to bursty workloads
    • Can be used for file cache

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

  • Priority: which VM gets the memory first
    • 1-10,000: default is 5,000
    • The higher the priority, the higher the availability
changes to root reserve
Changes to Root Reserve
  • Hyper-V has always had the concept of a reserve of memory that is kept for the parent partition
  • Host Reserve - Auto-calculated based on:
    • If the machine SLAT capability
    • Total size of host RAM
    • NUMA architecture

Host Reserve

VM Overhead

Memory utilized by VMs

VM Reserve

changes to root reserve27
Changes to Root Reserve
  • 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
      • Allows you to reserve static memory for the parent partition
    • May result in less memory being available for VMs
guest memory stats
Guest Memory Stats

Total committed memory in the VM

Physical Memory being used by the VM

Available Memory inside the VM

Ballooned Memory

2305 MB – 1720 MB = 585 MB

changes to numa management
Changes to NUMA management…
  • Wait – what is NUMA?
  • Why do I care?
  • How does this work today?
what is numa
What is “NUMA”?
  • A traditional computer:

VM

VM

VM

VM

VM

VM

VM

VM

Computer

Memory

BUS

CPU

CPU

CPU

CPU

what is numa31
What is “NUMA”?
  • A NUMA computer:

VM

VM

VM

VM

VM

VM

VM

VM

Computer

Back Channel

Memory

Memory

BUS

BUS

CPU

CPU

CPU

CPU

Node 1

Node 2

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

VM

VM

VM

VM

VM

VM

VM

VM

Computer

Good!

Back Channel

Memory

Memory

BUS

BUS

CPU

CPU

CPU

CPU

Node 1

Node 2

why do i care33
Why do I care?
  • Ideally VM memory should come from the “local NUMA node”

VM

VM

VM

VM

VM

VM

VM

VM

Computer

Bad

Back Channel

Memory

Memory

BUS

BUS

CPU

CPU

CPU

CPU

Node 1

Node 2

how does this work today
How does this work today?
  • Hyper-V tries to get all memory for a virtual machine from a single NUMA node
  • When it cannot – the virtual machine “spans” NUMA nodes
  • Users can set preferred NUMA nodes for virtual machines in order to get the best distribution
changes to numa management35
Changes to NUMA management
  • Dynamic 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
disabling numa spanning
Disabling NUMA Spanning
  • Makes the system behave like multiple small computers

VM

VM

VM

VM

VM

VM

VM

VM

Computer

Back Channel

Memory

Memory

BUS

BUS

CPU

CPU

CPU

CPU

Node 1

Node 2

test the rc and talk to us
Test the RC – and talk to us!
  • Try Dynamic Memory out – for both server and desktop environments
    • Let us know how DM is working for you
    • Let us know if you think we have something wrong
session evaluations

Session Evaluations

Tell us what you think, and you could win!

All evaluations submitted are automatically entered into a daily prize draw* 

Sign-in to the Schedule Builder at http://europe.msteched.com/topic/list/

* Details of prize draw rules can be obtained from the Information Desk.

slide41

© 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.