1 / 47

Dynamic Memory in Windows Server 2008 R2 SP1

Dynamic Memory in Windows Server 2008 R2 SP1. Jeff Alexander IT Pro Evangelist Microsoft Australia http://blogs.technet.com/jeffa36. Agenda. Memory Management & Virtualization Dynamic Memory Concepts Architecture Internals What about … VMW are ? SQL and SQL-like workloads?.

jadyn
Télécharger la présentation

Dynamic Memory in Windows Server 2008 R2 SP1

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Memory in Windows Server 2008 R2 SP1 Jeff Alexander IT Pro Evangelist Microsoft Australia http://blogs.technet.com/jeffa36

  2. Agenda • Memory Management & Virtualization • Dynamic Memory • Concepts • Architecture • Internals • What about… • VMWare? • SQL and SQL-like workloads?

  3. Windows Server 2008 R2 SP1 RemoteFX Dynamic Memory

  4. No one can size VMs • 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?

  5. No one wants to size VMs “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”

  6. Virtualization & Memory • 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

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

  8. Adding/Removing Memory • 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

  9. Dynamic Memory • 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

  10. Initial VM Start Finance VM 8 GB Sales VM Engineering VM 6 GB 4 GB 2 GB T = 0 T = 15 T = 30 T = 0 T = 15 T = 30 3 VMs started Total System Memory 8 GB Memory in Use by VMs 3 GB Physical Memory Used 37.5 % Virtual Machines Memory Settings

  11. 15 minutes later … work in progress Finance VM 8 GB Sales VM Finance starts reports Engineering starts ananalysis job Engineering VM 6 GB 4 GB 2 GB T = 0 T = 15 T = 30 T = 0 T = 15 T = 30 3 VMs started Total System Memory 8 GB Memory in Use by VMs 6 GB Physical Memory Used 75 % Virtual Machines Memory Settings

  12. 30 minutes later … working hard! Finance VM 8 GB Sales VM Finance starts reports Engineering starts ananalysis job Engineering VM Service VM 6 GB Engineering reaches max allocation 4 GB Finance report finished Engineering analysis running IT starts a Service VM 2 GB T = 0 T = 15 T = 30 T = 0 T = 15 T = 30 3 VMs started Memory recovered to allow Service VM Total System Memory 8 GB Memory in Use by VMs 7.5 GB Physical Memory Used 94 % Virtual Machines Memory Settings

  13. System Requirements • 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

  14. Dynamic Memory Architecture & Concepts

  15. Memory Management & Virtualization • Cache to improve performance • Windows Memory Manager utilizes all free memory for cache

  16. Dynamic Memory Concepts • Memory Demand: • Amount of memory VM needs • Automatically calculated • SP1: “Total Committed Memory” • Memory Buffer: • To satisfy cache needs for the VM • SP1: “User Configuration” Memory Buffer Memory Demand

  17. Dynamic Memory Concepts • SLAs • Startup Memory • Memory assigned during initial boot • Reserved memory for the VM • Maximum Memory • Limit memory for the VM • Target Memory • “Just right” memory for the VM Maximum Memory Memory Buffer Target Memory Memory Demand Startup Memory

  18. Dynamic Memory Architecture Guest Applications VMMS VMWP DM VDEV / VSP User Mode Memory Balancer Interface Memory Balancer WP Memory Management Kernel Mode Windows Memory Manager DM VSC Windows Memory Manager Windows Memory Manager VID VID VMBus VMBus Hypervisor

  19. Dynamic Memory VSC • 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

  20. Worker Process Memory Management • Orchestrate all Hyper-V memory operations • Live Migration Optimization: • Shrink the memory of the VM on the source node • Shorter migration times

  21. Dynamic Memory Components • 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

  22. Memory Balancer • Single place for all memory decisions • Calculates Memory Demand • Protects host from resource starvation • Ensures a stable system with minimal operations

  23. Host Memory 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 Host Reserve VM Overhead Memory Utilized by VMs VM Reserve

  24. Memory Balancing • When there is available memory on the host, VMs get their target memory Target Memory Buffer Target Memory Available Memory Buffer Memory Demand Memory Demand Root Reserve

  25. Memory Balancing • When there is no available memory on the host, weight is used to determine memory distribution Target Memory Buffer Priority Penalty TargetMemory Target Memory Buffer Priority Penalty Buffer Priority Penalty Buffer Buffer Memory Demand Memory Demand Memory Demand Root Reserve VM2 Medium Weight Hyper-V Host VM1 Low Weight VM3 High Weight

  26. When does DM balance memory? • 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

  27. Availability & Priority • 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

  28. Dynamic Memory demo

  29. System Impact

  30. Changes to Parent Reserve • 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

  31. VMWarevs Hyper-V What about?

  32. Memory Over-Commit (?) • 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

  33. VMWarevs Hyper-V

  34. VMWarevs Hyper-V 2 GB 2 GB Memory backed by different technologies VM Memory Maximum Memory Memory Buffer Memory backed by physical memory Memory always backed by physical memory Memory Demand VMWare Hyper-V

  35. VMWarevs Hyper-V • 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%

  36. VMWarevs Hyper-V • 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

  37. What Next?

  38. What's new Besides DM/RemoteFx • 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

  39. What's New Besides DM/RFx • Support for increased volume of authentication traffic on domain controllers connected to high-latency networks • SP1 allows for more granular control of the maximum number of possible concurrent connections to a domain controller

  40. Applications? What about?

  41. Application Compatibility • TAP program workload list: • SQL / AD / DNS / Print Server / File Server / IIS / LoB Apps / RDS / Win7 VDI / DA / DHCP / Exchange (Non-Mailbox Roles) / TMG 2010 / SPS 2010 / App-V / Med-V / OCS / FTP / WDS / … • TAP program workloads not utilizing DM: • Linux VMs • Exchange 2010 Mailbox Role

  42. Application Compatibility • 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

  43. SQL Server & Dynamic 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

  44. SQL Server & Dynamic Memory Static Memory Free Free Windows Memory Manager Low Resource Notification SQL Server Memory Free Memory Buffer Memory Demand Free SQL Server Memory Free Memory Buffer Memory Demand SQL Server Memory SQL Server Memory Free Memory Buffer Memory Demand SQL Server Memory Host View Guest View

  45. Microsoft Virtual Academy 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. TellTheDean@microsoft.com

  46. Resources • 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/en-us/library/ff817651(WS.10).aspx

More Related