Presentation is loading. Please wait.

Presentation is loading. Please wait.

Consolidation and Virtualization with SQL Server Rob Reinauer Product Unit Manager SQL Server Engine Melbourne User Group September 10, 2009.

Similar presentations


Presentation on theme: "Consolidation and Virtualization with SQL Server Rob Reinauer Product Unit Manager SQL Server Engine Melbourne User Group September 10, 2009."— Presentation transcript:

1 Consolidation and Virtualization with SQL Server Rob Reinauer Product Unit Manager SQL Server Engine Melbourne User Group September 10, 2009

2 Agenda SQL Server Consolidation Today Virtualization and Microsoft Hyper-V Architecture Capabilities with SQL Server Managing virtualized environments Performance of SQL Server with Hyper-V Scalability across multiple VMs on a system IO Performance Achieving Scalability with Virtualization CPU, Memory, Network and Disk subsystems Microsoft IT Case Study Questions

3 Forces Driving Consolidation Hardware Utilization Efficiency Datacenter deployment efficiency Power Utilization Hardware standardization initiatives Management Efficiency Fewer physical servers to manage and maintain Centralized management of multiple/many servers Infrastructure Agility Load Balancing Lowered cost and complexity for High Availability

4 SQL Server Consolidation Today Higher Isolation, Higher Costs Higher Density, Lower Costs MyServer Databases Instances IT Managed Environment Virtual Machines Schemas Microsoft Confidential Sales_1 Marketing_1 Online_Sales ERP_10 DB_1 DB_2 DB_3 Consolidate_1 Currently a variety of consolidation strategies exist and are utilized. Typically, as isolation goes up, density goes down and cost goes up.

5 Schema level consolidation Multiple databases are collapsed into a single database Forces common security model on all applications Typically requires changes to application and scripts Many opportunities for subtle cross interactions Namespace collisions and conflicts Unexpected dependencies / performance contentions SQL Server Consolidation Today Higher Isolation, Higher Costs Higher Density, Lower Costs Microsoft Confidential

6 Database level consolidation Multiple databases hosted on a single instance Common security, manageability and compatibility models required Might require changes to existing applications and scripts Lower manageability costs Better resource isolation and allocation capabilities through Resource Governor. SQL Server Consolidation Today Higher Isolation, Higher Costs Higher Density, Lower Costs Microsoft Confidential

7 Instance level consolidation Multiple Instances running on one system Full schema and security isolation Partial system resource & management isolation Potential conflicts in namespace, resources and system roles System Memory and CPU are typical density limiters SQL Server Consolidation Today Higher Isolation, Higher Costs Higher Density, Lower Costs Microsoft Confidential

8 SQL Server Consolidation Today Higher Isolation, Higher Costs Higher Density, Lower Costs Microsoft Confidential Virtual Machine consolidation Strong isolation between applications Ease of capturing and moving execution loads Out of the box High Availability configuration Flexible storage management Fewer systems, but just as many OS images to manage Increased resource usage

9 What is Virtualization? Multiple operating systems images supporting separate independent applications running simultaneously on the same computer system. Strong hardware enforced isolation between the VMs Server Child Partition Root Partition DevicesProcessorsMemory Hypervisor Hardware One Physical Server Server Child Partition SP2 RC Server Child Partition

10 Virtualization Scenario: Windows Server 2008 is installed on the bare system, Hyper-V enabled DevicesProcessorsMemory Hardware Hypervisor One Physical Server Running one application on one OS Root Partition

11 Virtualization Scenario: Windows Server 2008 is installed on the bare system, Hyper-V enabled DevicesProcessorsMemory Hypervisor Hardware One Physical Server Server Child Partition Running one application on one OS Windows Server 2008 and SQL Server 2008 are installed or imaged into a child partition. Root Partition

12 We would like to try out our application running against SQL Server 2008 running on Windows Server 2008 SP2 RC. But… we need to keep our existing application online and running. DevicesProcessorsMemory Hypervisor Hardware One Physical Server Server Child Partition SP2 RC Server Child Partition Virtualization Scenario: Deploying Test Bed Environments New OS and SQL Server installed or imaged into new child partition Root Partition

13 Server Child Partition We would like to retire old hardware servers But… we don’t want to purchase new hardware or go through a re- verification on new operating system and SQL Server versions. DevicesProcessorsMemory Hypervisor Hardware One Physical Server Server Child Partition SP2 RC Server Child Partition Virtualization Scenario: Consolidating Legacy Applications System Center VMM migrates a physical server image to a Hyper-V partition. Root Partition

14 Hyper-V Architectural overview The Hyper-V Hypervisor runs directly on the hardware Provides virtualized execution environment for operating systems Operating systems and applications run in partitions on top of the Hypervisor Enlightenments provide fast paths to mitigate overhead

15 Windows Server 08 R2 Hyper-V Improvements Virtualization Feature WS08 Hyper-V RTM WS08 Hyper-V SP2 Windows Server 2008 R2 Hyper-V (Windows 7) Logical Processor Support 162464 Physical Socket Support 448 Total number of running VMs 128192384 Address Space Management Software Emulation Hardware (SLAT / IOMMU) Effective Core Parking Limited Yes Zero Down Time Load Migration No (Quick Migration) Yes (Live Migration) Cluster Shared Volumes (CSV) No Yes Network stack offloading No Yes Online storage provisioning No Yes

16 High Availability for SQL Server In Virtualized Environments Consolidation Increases the importance of High Availability Features Consolidation serves to increase cost for a single system failure Increasing focus on planned outages vs. unplanned outages Microsoft Confidential Shared Disk Environments - SANs, iSCSI, NAS, Windows Fail-Over Clusterin g Host based Clustering Child partition based Clustering Non-Shared Disk Environments SQL Server Mirroring Transactional and Peer-to-Peer replication Log Shipping Resource Isolation Hyper-V Manager SCVMM SQL Server Resource Manager

17 High Availability In Virtualized Environments Windows Fail-Over Clustering - Host Level Clustering One complete system fails over to another system All VMs on the source system fail over Each VM can target different physical systems for fail-over. Each VM is re-started on fail-over target system WFC migrates LUNs to target system(s) Enables Live Migration in Windows 2008 R2

18 Child Partition 1 SQL 2008 Child Partition 2 SQL S005 Parent Partition Lun1->E: Hypervisor D1.VHD->S: E:\D1.VHD E:\D2.VHD F:\D1.VHD F:\D2.VHD D2.VHD->S: D1.VHD->T:D2.VHD->T: System 1 SAN FiberChannel or iSCSI System 2 Lun2->F: LUN 1 Windows Failover Clustering No Child Partitions In Existence. SQL Server High Availability with Hyper-V Host Level Clustering - Partition movement, Drive routings Pre-Failover LUN 2

19 Child Partition 1 SQL 2008 Child Partition 2 SQL S005 Parent Partition Lun1->E: Hypervisor D1.VHD->S: E:\D1.VHD E:\D2.VHD F:\D1.VHD F:\D2.VHD D2.VHD->S: D1.VHD->T:D2.VHD->T: System 1 SAN FiberChannel or iSCSI System 2 Lun2->F: LUN 1 Windows Failover Clustering SQL Server High Availability with Hyper-V Host Level Clustering - Partition movement, Drive routings After-Failover LUN 2 System Failure

20 High Availability In Virtualized Environments Windows Fail-Over Clustering - Guest Level Clustering Clustering applied at the individual VM level A single VM on the source system fails over to another VM Each VM can target different physical systems for fail-over. WFC does not migrate LUNs to target system(s) iSCSI typically required

21 Child Partition 1 SQL 2008 Child Partition 2 SQL S005 Parent Partition Hypervisor D1.VHD->S:D2.VHD->S: System 1 SAN iSCSI System 2 LUN 1 Windows Failover Clustering SQL Server High Availability with Hyper-V Guest Partition Clustering - Partition movement, Drive routings Pre-Failover LUN 2 Child Partition 1 Child Partition 2 Parent Partition Hypervisor D1.VHD->T:D2.VHD->T:

22 Child Partition 1 SQL 2008 Child Partition 2 SQL S005 Parent Partition Hypervisor D1.VHD->S:D2.VHD->S: System 1 SAN iSCSI System 2 LUN 1 Windows Failover Clustering SQL Server High Availability with Hyper-V Guest Partition Clustering - Partition movement, Drive routings After-Failover LUN 2 Child Partition 2 Parent Partition Hypervisor D1.VHD->T:D2.VHD->T: Child Partition 1 SQL 2008 D1.VHD->S: D1.VHD->T: Partition Failure

23 Delivered in Windows 2008 R2 Migrates a running VM with essentially zero down time Actually, several seconds of downtime, but connections are maintained Allows essentially zero down time: Hardware maintenance Patching and servicing of host OS Currently does not allow zero down time; Patching and servicing of guest OS Patching and servicing of applications within guest VMs Hyper-V Live Migration

24 Root Partition Hypervisor Hardware Physical Server Source Child Partition Partition Memory Network Connections Hypervisor Hardware Changed Pages Storage Connections Root Partition Physical Server Destination Child Partition Step 1: Snapshot VM memory Copy partition memory from source VM to Destination Partition Memory Shared Storage LUN 2LUN 1 Network Connections Hyper-V Live Migration How it works: step by step

25 Step 2: Copy changed pages from source VM to destination Root Partition Hypervisor Hardware Physical Server Source Child Partition Partition Memory Network Connections Hypervisor Hardware Changed Pages Storage Connections Root Partition Physical Server Destination Child Partition Partition Memory Shared Storage LUN 2LUN 1 Network Connections Changed Pages Hyper-V Live Migration How it works: step by step

26 Step 3: Storage connections are migrated from the source VM to the destination VM. Root Partition Hypervisor Hardware Physical Server Source Child Partition Partition Memory Network Connections Hypervisor Hardware Changed Pages Storage Connections Root Partition Physical Server Destination Child Partition Partition Memory Shared Storage LUN 1 Network Connections Changed Pages Storage Connections LUN 2 Hyper-V Live Migration How it works: step by step

27 Step 4: Network connections are migrated from source VM to destination VM Root Partition Hypervisor Hardware Physical Server Source Child Partition Partition Memory Network Connections Hypervisor Hardware Changed Pages Storage Connections Root Partition Physical Server Destination Child Partition Partition Memory Shared Storage LUN 1 Changed Pages Storage Connections Network Connections LUN 2 Hyper-V Live Migration How it works: step by step

28 Source Child Partition Step 5: Destination VM is brought online, Source VM is taken off line Root Partition Hypervisor Hardware Physical Server Destination Child Partition Hypervisor Hardware Root Partition Physical Server Partition Memory Shared Storage LUN 1 Changed Pages Storage Connections Network Connections LUN 2 Hyper-V Live Migration How it works: step by step

29 Centralized management of Virtual Machine creation, configuration and provisioning Provides wizards for creation and provisioning of VMs and devices Provides tools for creation and provisioning of Virtual Hard Drives (VHDs) Limited import capabilities Creating and managing Virtual Machines Hyper-V Role in Windows 2008 Server Manager

30 System Center Virtual Machine Manager 2008 Creating and managing Virtual Machines Physical to Virtual and Virtual to Virtual image creation In place physical systems can be provisioned to VMs VMWare VMs can be translated to Hyper-V Rapid Virtual Machine Provisioning – Virtual Machine Library Multi-machine management across system and VMs PRO - Performance and Resource Optimization and automation

31 System Center VMM Multi-Machine Monitoring and Management System Center Virtual Machine Manager 2008 Creating and managing Virtual Machines

32 Evaluating Virtual Machine Efficiency We wanted to address the following questions: Hypervisor Hardware SQL running in 8 Separate virtual machines running on a single system Hardware R2 8 Separate SQL Instances running on a single system If Consolidating Servers: 1. Is it more efficient to utilize multiple instances (Scenario 1 below) or multiple virtual machines (Scenario 2) 2. How much overhead develops with larger numbers of instances and Virtual Machines? Scenario 1Scenario 2

33 Hyper-V + Processor virtualization support = Huge Win! SLAT (second level address translation) 1% - 2% overhead per Virtual Machine Measurement Configuration  AMD Shanghai CPUs  SLAT support  No IOMMU  HP DL585 16 Cores  HP EVA8000 SAN  Windows 2008 R2 RC  VM Configurations  4 Virtual Processors  7GB RAM  Fixed VHDs  Approximately 10% CPU utilization / VM  Relative Throughput is normalized per VM BatchRequests/SecBatchRequests/Sec TotalCPUUtilizztionTotalCPUUtilizztion Evaluating Virtual Machine Efficiency

34 Achieving Scalability With Virtualization CPU Utilization The sum of the CPU utilizations of consolidated applications should not exceed the capacity of the target system CPU cores can be explicitly allocated to Virtual Machines CPU reserves, limits and relative priorities can be specified CPU cores can be over committed For example: - On an 8 core system 4 VMs can each be allocated 4 virtual CPUs -System scheduling provides load balancing across the VMs -The administrator could specify limits and reserves across the VMs Scalability requires balanced system capabilities CPU, Memory, Network and Disk subsystem bandwidth

35 Achieving Scalability With Virtualization Scalability requires balanced system capabilities CPU, Memory, Network and Disk subsystem bandwidth Memory Allocation and Utilization Memory is allocated to virtual machines in fixed amounts Assume ~1.5 GB consumed by Operating System and SQL Server instance code pages Remaining memory utilized for data caching, mostly for SQL Server Network subsystem bandwidth Sufficient bandwidth must be provided for the sum total of the consolidated applications Task Manager and Perfmon can provide statistics on application network utilization

36 Achieving Scalability With Virtualization Scalability requires balanced system capabilities CPU, Memory, Network and Disk subsystem bandwidth Disk subsystem bandwidth I/O Bandwidth is typically gated on number of random I/Os not MB/Sec. throughput Throughput typically scales with number of drives not with the speed of the attach bus Throughput essentially never scales with the space of the storage subsystem Disk attach bus bandwidth may become significant when: The work loads generate significant percentages of sequential I/O Multiple I/O intensive applications generate large numbers of I/Os Solid State storage is being utilized Perfmon can provide statistics on number of I/Os, latency and bandwidth utilization.

37 Evaluating Virtual Machine Efficiency Qlogic Fiber Channel SAN Performance Benchmark Windows Server 2008 with fiber channel SAN achieves more than 200,000 I/O operations per second. On a range of tests, Hyper-V based I/O workloads were between 88% and 99% of native performance 90% 88% 97% 99% Hyper-V I/O operations per second compared to Native OS IOPS Non-IOMMU Enabled CPUs

38 Case Study – MSIT SQL Consolidation Pre-Consolidation State ~2,700 Applications in MSIT Portfolio ~4797 SQL Server Instances ~100,000 databases ~20% end-of-life hosts/year ~10% CPU utilization across hosts Consolidation Approach Microsoft IT evaluated database, instance and host based consolidation Resource Management Approach Resource Management effectiveness considered critical issue Instance based would utilize WSRM Hyper-V allows explicit allocation of CPU and IO channels Microsoft IT Infrastructure Overview

39 Case Study – MSIT SQL Consolidation Consolidation Strategy Host Consolidation utilizing Hyper-V Target of 6 to 1 consolidation ratio Fixed Virtual Drives (VHDs) over Dynamic and Pass Through Consolidation Approach Decision starting point was instance based consolidation Evaluation led to decision change: Hyper-V based host consolidation WSRM vs. Hyper-V Microsoft IT evaluated WSRM vs. Hyper-V & ultimately chose Hyper-V Microsoft IT Consolidation Conclusions

40 Case Study - Microsoft IT Consolidation Operational Results

41 Summary Hyper-V based virtualization is an effective server consolidation platform for SQL Server Modern CPUs easily achieve efficient SQL Server scalability out beyond 8 virtual machines. The Microsoft Hyper-V platform and SQL Server work together to implement robust high availability environments. Windows 2008 R2 Live Migration offers effectively zero down time load migration between two systems. Microsoft IT has documented a successful server consolidation strategy utilizing Hyper-V. The System Center Virtual Machine Manager provides powerful tools to manage Virtual Machines Migrating existing native system images to Hyper-V images Administration and monitoring for multiple Virtual Machines PRO - Performance and load balancing automation

42 SQL Server Community Resources Become a FREE PASS Member: www.sqlpass.org/RegisterforSQLPASS.aspx www.sqlpass.org/RegisterforSQLPASS.aspx Learn more about the PASS organization www.sqlpass.org/www.sqlpass.org/ Additional Community Resources SQL Server Community Center www.microsoft.com/sqlserver/2008/en/us/community-center.aspx www.microsoft.com/sqlserver/2008/en/us/community-center.aspx TechNet Community for IT Professionals http://technet.microsoft.com/en-us/sqlserver/bb671048.aspx Developer Center http://msdn.microsoft.com/en-us/sqlserver/bb671064.aspx SQL Server 2008 Learning Portal http://www.microsoft.com/learning/sql/2008/default.mspx http://www.microsoft.com/learning/sql/2008/default.mspx The Professional Association for SQL Server (PASS) is an independent, not-for-profit association, dedicated to supporting, educating, and promoting the Microsoft SQL Server community.

43 References Running SQL 2008 in Hyper-V Environment http://sqlcat.com/whitepapers/archive/2008/10/03/running-sql-server-2008-in-a-hyper-v- environment-best-practices-and-performance-recommendations.aspx Microsoft IT virtualization case study http://technet.microsoft.com/en-us/library/dd557540.aspx Green IT in Practices: SQL Server Consolidation in Microsoft IT http://msdn.microsoft.com/en-us/library/dd393309.aspx Qlogic Hyper-V IO performance benchmarks http://www.qlogic.com/promos/products/hyper-v.aspx Windows Server Hyper-V site http://www.microsoft.com/windowsserver2008/en/us/virtualization-consolidation.aspx System Center Virtual Machine Manager 2008 R2 site http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/default.aspx Hyper-V Technet center http://technet2.microsoft.com/windowsserver2008/en/servermanager/virtualization.mspx SQL Server 2008 Business Value Calculator: http://www.microsoft.com/sqlserver/2008/en/us/value-calc.aspx

44 Questions?


Download ppt "Consolidation and Virtualization with SQL Server Rob Reinauer Product Unit Manager SQL Server Engine Melbourne User Group September 10, 2009."

Similar presentations


Ads by Google