Consolidation and Optimization Best Practices: SQL Server 2008 and Hyper-V Dandy Weyn | Microsoft Corp. Antwerp, March 12 2009.

Slides:



Advertisements
Similar presentations
Capacity Planning in a Virtual Environment
Advertisements

© 2010 VMware Inc. All rights reserved Confidential Performance Tuning for Windows Guest OS IT Pro Camp Presented by: Matthew Mitchell.
VSphere vs. Hyper-V Metron Performance Showdown. Objectives Architecture Available metrics Challenges in virtual environments Test environment and methods.
11 HDS TECHNOLOGY DEMONSTRATION Steve Sonnenberg May 12, 2014 © Hitachi Data Systems Corporation All Rights Reserved.
Virtual Machine Security Design of Secure Operating Systems Summer 2012 Presented By: Musaad Alzahrani.
PDI 2009 Lance Baatz and Jason Huitt ACNS.  Introduction  Hyper-V Architecture  Installing Hyper-V and creating Virtual Machines using Hyper-V Manager.
VMware Infrastructure Alex Dementsov Tao Yang Clarkson University Feb 28, 2007.
Consolidation and Virtualization with SQL Server Rob Reinauer Product Unit Manager SQL Server Engine Melbourne User Group September 10, 2009.
Lesson 7: Creating and Configuring Virtual Machine Settings
Windows Server Virtualization Scenarios And Features Jeff Woolsey Lead Program Manager Windows Virtualization Microsoft Corporation.
Virtual Network Servers. What is a Server? 1. A software application that provides a specific one or more services to other computers  Example: Apache.
Windows 7 Windows Server 2008 R2 VirtualizationVirtualization Heterogeneous Server Environment Inventory Linux, Unix & VMware Windows 7 & Server 2008.
Presented by Jacob Wilson SharePoint Practice Lead Bross Group 1.
Scalability Module 6.
Virtualization Performance H. Reza Taheri Senior Staff Eng. VMware.
VMware vSphere 4 Introduction. Agenda VMware vSphere Virtualization Technology vMotion Storage vMotion Snapshot High Availability DRS Resource Pools Monitoring.
Hyper-V High-Availability & Mobility: Designing the Infrastructure for Your Private Cloud Symon Perriman Technical Evangelist Microsoft
Windows Server 2008 R2 CSIT 320 (Blum) 1. Server Consolidation – Today’s chips have enhanced capabilities compared to those of the past. In particular.
Hardware Platform (CPU, AMD-V or Intel – VT) Hypervisor Parent partition (Windows with Hyper-V Role enabled) VM Worker processes VMBUS Device Driver.
Jeff Alexander IT Pro Evangelist Microsoft Australia
Robert Larson Delivery Architect Microsoft Corporation SESSION CODE: WSV316 David Lef Principal Systems Architect Microsoft Corporation.
Windows Server 2012 VSP Windows Kernel Applications Non-Hypervisor Aware OS Windows Server 2008, 2012 Windows Kernel VSC VMBus Emulation “Designed for.
Making the Virtualization Decision. Agenda The Virtualization Umbrella Server Virtualization Architectures The Players Getting Started.
CERN IT Department CH-1211 Genève 23 Switzerland t Virtualization with Windows at CERN Juraj Sucik, Emmanuel Ormancey Internet Services Group.
VIR309. Installed? What version? Are all of the ICs added to the VMs? Integration Components Supported LPs number on host Number of logical processors.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Key Perf considerations & bottlenecks Windows Azure VM characteristics Monitoring TroubleshootingBest practices.
How to Resolve Bottlenecks and Optimize your Virtual Environment Chris Chesley, Sr. Systems Engineer
Vital Signs: Performance Monitoring Windows Server
1 Julius Davies Architectural Technology Specialist Microsoft.
Module 7: Hyper-V. Module Overview List the new features of Hyper-V Configure Hyper-V virtual machines.
Deploying Windows Server 2008 Hyper-V Best Practices
Appendix B Planning a Virtualization Strategy for Exchange Server 2010.
Gopal Ashok Program Manager Microsoft Corp. Agenda SQL Server Consolidation Virtualization & Microsoft Hyper-V Architecture Consolidation Performance.
Storage Management in Virtualized Cloud Environments Sankaran Sivathanu, Ling Liu, Mei Yiduo and Xing Pu Student Workshop on Frontiers of Cloud Computing,
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
Improving Network I/O Virtualization for Cloud Computing.
Improving Disk Latency and Throughput with VMware Presented by Raxco Software, Inc. March 11, 2011.
Virtual Machine and its Role in Distributed Systems.
From Virtualization Management to Private Cloud with SCVMM 2012 Dan Stolts Sr. IT Pro Evangelist Microsoft Corporation
Designing and Deploying a Scalable EPM Solution Ken Toole Platform Test Manager MS Project Microsoft.
Session objectives Discuss whether or not virtualization makes sense for Exchange 2013 Describe supportability of virtualization features Explain sizing.
Ewan Fairweather & Petr Kratochvil BPD Customer Experience Team Microsoft.
Joe Yong Chief Architect Scalability Experts SESSION CODE: DAT 205.
Mike Neil General Manager Microsoft Corporation.
Rob Reinauer Product Unit Manager SQL Server Engine Microsoft Corporation Lindsey Allen Principal Program Manager Lead Microsoft Corporation DAT318.
Microsoft Virtual Server: Overview and Roadmap Mike Neil Product Unit Manager Windows Virtualization microsoft.com Microsoft Corporation.
Case for Server Virtualization. Content Why virtualize? Business value of virtualization Virtualization technologies & Hyper-V overview Management and.
Clint Huffman Microsoft Premier Field Engineer (PFE) Microsoft Corporation SESSION CODE: VIR315 Kenon Owens Technical Product Manager Microsoft Corporation.
Hyper-V Performance, Scale & Architecture Changes Benjamin Armstrong Senior Program Manager Lead Microsoft Corporation VIR413.
Virtual techdays INDIA │ august 2010 virtual techdays INDIA │ august 2010 Consolidate and Virtualize your Linux Environment M.S.Anand │ Technology.
Rick Claus Sr. Technical Evangelist,
Full and Para Virtualization
20409A 7: Installing and Configuring System Center 2012 R2 Virtual Machine Manager Module 7 Installing and Configuring System Center 2012 R2 Virtual.
Cloud Computing Lecture 5-6 Muhammad Ahmad Jan.
Dawie Human Infrastructure Architect Inobits Consulting VIR202.
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
Virtual techdays INDIA │ 9-11 February 2011 High Availability Clustering using Windows Server 2008 R2 Ninad Doshi │Associate Consultant-Global Delivery,
Capacity Planning in a Virtual Environment Chris Chesley, Sr. Systems Engineer
SYSTEM CENTER VIRTUAL MACHINE MANAGER 2012 Gorazd Šemrov Microsoft Consulting Services
Windows Server 2008 VSP Windows Kernel Applications Non- Hypervisor Aware OS Windows Server 2003, 2008 Windows Kernel VSC VMBus Emulation “Designed.
REMINDER Check in on the COLLABORATE mobile app Best Practices for Oracle on VMware - Deep Dive Darryl Smith Chief Database Architect Distinguished Engineer.
Course 03 Basic Concepts assist. eng. Jánó Rajmond, PhD
1 SQL Server on VMware? Rob Mandeville Senior DBA, Confio Software 1 Virtualizing Our Environment: Lessons Learned Rob Mandeville.
Dynamic Memory and Remote Fx Perumal Raja Dell India R & D Centre.
Brian Lauge Pedersen Senior DataCenter Technology Specialist Microsoft Danmark.
Specialized Cloud Architectures
Windows Virtual PC / Hyper-V
Your Data Any Place, Any Time
Presentation transcript:

Consolidation and Optimization Best Practices: SQL Server 2008 and Hyper-V Dandy Weyn | Microsoft Corp. Antwerp, March

Key Question “If the limitations of the Guest VM meet the requirements of the workload.” Should I consider SQL Server within Hyper-V guests for production Environments? YES

Questions asked What are the hardware limitations? What are the restrictions of each VM?

16 cores 2 TB No limit (500 rec.) No limit (500 rec.) Hyper-V limitations

1-4 VPs 64 GB 260 disks 2 TB each 260 disks 2 TB each 8 NICs Hyper-V limitations

Hyper-V Architecture Root Partition I/O Stack Drivers Child Partition I/O Stack VSCs Server Child Partition I/O Stack VSCs Server Hypervisor DevicesProcessorsMemory VMBus Shared Memory VSPs OS Kernel Enlightenments (WS08+)

Questions asked What’s best for SQL Server? What are the best practices for Hyper-V? What are considerations for SQL Server 2008? What are the recommended storage options? How to monitor performance? Do you have any metrics?

What’s best for SQL Server? Identify the workload Perform through Monitoring best practices Understand the benefits of using Hyper-V

Hyper-V Best Practices Use synthetic devices for best performance Are installed with integration components Utilize a VSC and VSP to pass requests over a VM Bus to the root partition Occurs in kernel mode once initial request is passed from VM Less CPU overhead then emulated devices Emulated devices should be avoided, but may be needed during initial configuration of guest VM

Considerations for SQL Server Functional Considerations Supported configurations High-Availability IO performance overhead Proper sizing and configuration of storage Pass-through or fixed VHDs are recommended Heavy Network resources may see most CPU overhead on performance impact Network tuning is advisable

Recommended Storage Guest VM w/Pass-through disks Disk will be offline at the root partition Physical disk counters must be used to monitor I/O to monitor from Root Observed the physical disk numbers showing duplicate or non-existent instances of disk objects (known Windows issue) Guest VM with VHD Monitoring Logical or Physical disk counters within guest VM needed to determine IO rates to a specific VHD Monitoring at the root partition will provide aggregate values for all I/O issued against all VHDs hosted on the underlying partition/volume

What you shouldn’t do… Dynamically expanding disks Generates increased I/O for disk read and write activities Generates increased CPU usage

Performance Monitoring Hyper-V Processor Counters are the best way to get true measure of CPU utilization Logical Processor: Total CPU time across entire server Root Virtual Processor: CPU time for Root partition Virtual Processor: CPU time for each guest virtual processor Traditional % Processor Time counters in either guest or root may not be accurate

Native Server vs. VM OLTP workload used as test harness using 3 different load levels ConfigurationStorageCPU Cores Physical CPU Cores VM Notes Native 4N/AHyper-V Disabled (bcdedit /set hypervisorlaunchtype off) Native 4N/AHyper-V Enabled Guest VMPass-Through Disks 44 VirtualAll Synthetic Devices Guest VMStatic VHD Files44 VirtualAll Synthetic Devices Workload LevelTarget CPU Low20-30% Medium50-60% High80% Configurations Compared

Native vs. VM CPU Utilization vs. Throughput Same throughput attainable however there is more CPU overhead with hyper-v enabled or when running within a VM Some overhead observed with Hyper-V just being enabled

Native vs. VM IO Performance

Running Concurrent VMs Performance and Scalability of Consolidating VM’s Same OLTP workloads Workload LevelTarget CPU Low20-30% Medium50-60% High80% Scenarios Tested 1. Concurrent VM’s Performance 2. Concurrent VM’s in CPU Overcommit Scenario Total Virtual CPUs across all VMs > Total Physical CPUs on server 3. CPU overhead when scaling number of VM’s from 2 to 4 4. Shared vs. Dedicated Storage Models Configuration  Each guest VM configured with 4 logical CPUs  Identical storage configuration (per VM)  Root with 8 physical CPU cores for scenarios 1 & 2  Root with 16 physical CPU cores for scenarios 3 & 4

Two Concurrent Guests 8 CPU Core Root – Performance Two VMs running concurrently on Root with 8 CPU cores available Each guest configured with 4 logical processors Number of VM’s is constant CPU overhead between Root and a VM (delta between lines) is relatively constant for varying workload. Recommendation: To achieve best performance of VM’s limit processes running which consume CPU resources on the Root.

Four Concurrent VM Guests Overcommitted CPU Resources Root configured with 8 physical CPU cores Comparing 2 VM’s Scenario 1: Two VMs (8 total virtual CPUs) Scenario 2: Four VMs (16 total virtual CPUs)  CPU resources overcommitted Conclusion: There is more overhead managing 4 VM’s even though cumulative server CPU resources were not exhausted Approximately 16% CPU overhead Number of VM’s Total Batches/sec Total Guest CPU% Total CPU%Relative Throughput (Batches/sec per CPU%) %46.0% %93.1%22.2

Two to Four Concurrent VM’s 16 CPU Core Root – CPU Overhead (2 vs. 4)  Relative throughput of concurrent VM’s on 16 CPU core Root – Normalized = (Baseline of single VM on 4 CPU Root) * 4 (Ideal case) – Compare - Normalized vs. 2 concurrent VM’s vs. 4 concurrent VM’s  CPU overhead increases over normalized range as number of VM’s increase  Range of 2-4% for 2 VM’s, Range of 13-16% for 4 VM’s

Distribution of Throughput Workload Throughput Distribution Across VM’s Distribution of throughput across four VMs running concurrently Throughput is relatively balanced VM4 utilizes VHD instead of pass-through for SQL data storage

Storage Configuration Comparison Shared (VHDs) vs. Dedicated Spindles (Pass-through) Dedicated per VM using passthrough disks: SQL Data – 2 LUNs 150GB LUNs using RAID 1+0 (4+4) Sets SQL Log – 1 LUN 50GB LUN using RAID 1+0 (2+2) Set Disk Configuration per VM/Root  Shared using static VHDs (single logical volume at Root level) : Single Pool of Disks for data files and single pool for logs F: Data files Two 150 GB VHDs per VM G: Log files One 30GB LUN VHD per VM

Storage Configuration Comparison Total Read IO’s vs. Latency VHD’s on Shared Storage vs. Dedicated Spindles using Passthrough Disks Measuring average reads per second vs. latency VHDs on common disks has slight latency overhead and less throughput Avg. Disk/sec Read

Comparing Consolidation Options Multi-Instance SQL vs. Hyper-V VMs Multiple SQL InstancesMultiple VM’s Isolation Shared Windows instanceDedicated Windows instance CPU Resources Number of CPUs visible to Windows instanceMaximum Windows 2008 – up to 4 virtual CPUs Windows 2003 – up to 2 virtual CPUs Memory Server Limit Flexible (max server memory) Statically allocated to VM Offline changes only No ability to “overcommit” memory resources 64GB limit per VM 2 TB Limit per Host Storage SQL Data Files with standard storage optionsSQL Data Files using Passthrough or Virtual Hard Disks exposed to VM Resource Management WSRM (process level)Hyper-V guest VM Number of instances 50Practical limit determined by physical resources Support Normal Rules ApplySupport for SQL Server 2008 & 2005 High Availability Normal Rules ApplyGuest clustering support Database Mirroring Log Shipping

Resource Management Hyper-V – CPU Resources Virtual Machine Reserve – Guarantees resources – Disallows others from using resources – use with caution Virtual Machine Limit – Upper limit on host resources (CPU) available to VM Relative Weight – Defines ratios of processing resources available to VMs – Priority given to VMs based on settings – only enforced when total resources become heavily utilized

Resource Management Multi-Instance SQL (vs. multiple VM’s) using Windows ® System Resource Manager Resource Application Policy – Policies enforced once total CPU utilization thresholds are exceeded – Supports scheduling of different policies – Supports memory and CPU affinity (not recommended for use with SQL Server Engine) Available on all Windows 2008 versions

Hyper-V Best Practices CPU “Enlightenments” – Include optimizations related to CPU efficiency, scalability of multi-processor VMs and reduction of overhead for memory access – Not available for all guest operating systems (not available for Windows 2003 guests) It is possible to “overcommit” CPU resources Total number of guest virtual CPUs > the number of physical CPU cores – May introduce additional CPU overhead when all workloads are busy – Note: Memory is allocated for VMs in a static fashion and can only be modified when a guest is offline (no ability to “overcommit”)

Recommendations Optimizing for SQL Server PASS-TROUGH or FIXED VHDs USE SYNTHETIC DEVICES INSTALL HYPER-V INTEGRATION COMPONENTS OPTIMIZE NETWORK PERFORMANCE TEST PERFORMANCE WORKLOAD

Support Considerations SQL Server in VM’s Hyper-V is supported on SQL 2008/2005 Guest-Clustering is not supported 29

Additional References Running SQL Server 2008 in a Hyper-V Environment – Best Practices and Performance Considerations practices-and-performance-recommendations.aspx Windows Server Hyper-V site – Hyper-V Technet center – Performance Tuning Guidelines for Windows 2008 Server (section on Hyper-V) – Hyper-V Related BLOGS – – – – – –

Appendix

Hardware Configuration Server – Dell R900 – 4 socket, 16 core Intel based 2.40 GHz, 1066Mhz bus, 6MB L2 Cache – 64 GB Physical Memory – 2x 4Gb/s dual port Emulex HBA’s – 1x Broadcom 1Gb/s NIC Storage Array - HDS AMS 1000 – 8x Data LUNs, 4x Log LUNs – 1x Backup LUN Single 6 disk (5+1) RAID 5 set – Two storage configurations tested No spindle sharing with other hosts in either configuration

Monitoring Performance – Test Results CPU and disk counters measured from root and guest to observe any differences Example of counters measured: Counters Measured from… Counter Low OLTP Workload Med OLTP Workload High OLTP Workload Guest VM Transactions/sec Batches/sec % Processor Time % Privilege Time Logical - Avg. Disk sec/Read (_Total) Logical - Disk Reads/sec (_Total) Root partition % Processor Time % Privilege Time Hyper-V – Logical Processor %Hypervisor Run Time Hyper-V Logical Processor %Total Run Time Hyper-V Logical Processor %Guest VM Run Time Physical - Avg. Disk sec/Read (_Total) Physical - Disk Reads/sec (_Total) Batches per CPU % (Batches/sec / % Processor Time)