joe yong chief architect scalability experts [email protected] session code: dat 205
TRANSCRIPT
SQL Server Consolidation and Virtualization:Myths and RealitiesJoe YongChief ArchitectScalability [email protected]
SESSION CODE: DAT 205
Before we beginGoals
Understand the goals and requirements of consolidationReview common oversights, myths and best practices for consolidationRelationship between consolidation and virtualizationReal problems to be addressed Picking the right solution for the problem
Non-goalsDeep dive into consolidation or virtualization technologiesOne size fits all scripted solutionFlashy SQL Server demo fest
AgendaConsolidation reviewVirtualization reviewThe real problemsCommon groundRight solution for the problem
Why consolidate
Short term benefitsImmediate cost savings –licenses, infrastructure, maintenance, HADRHalt / reverse uncontrolled growth and/or allow growthRegulatory complianceImprove utilization levels
Long term benefitsOperational costs savingsExpand and extendSimplify managementStandardization of SLAs / support
What to consolidateEasy candidates
Small & medium sizedRead-only or mostly reads
Average candidatesBusiness critical but no special requirementsVLDB with low to moderate workload demands
Tough candidatesVery high availability requirementsExtremely busy workload (‘000s of transactions per second)High / complex security settingsHard coded paths
Additional considerations and caveatsConsolidate homogeneous/similar workloads
Generally good guideline but there are caveatsLikely to have similar resource utilization and/or demand characteristicsPeak utilization at same time periods – contention
Mixed workloads with different peak periods and resource utilization are viable
ISV applicationsCase-by-case; check with the ISV
Always end in one (1) central locationRegional consolidation is viable; often practical
Get buy in from all parties/peersGood to do but top-down mandate is critical for success
Consolidation strategy
Inte
ropera
bili
ty
Lower cost, better control
Reduce Servers
File Server
Database
Forward Consolidation(new deployments)
Backward Consolidation(current systems)
Improve Management
Enterprise IT – CIO/BDM point of view
Enterprise IT – DBA/SysAdmin POV
Consolidation optionsSingle instance, single database, multi-schema
Very difficult to achieveCommon in “Other” database platformSignificant opportunity for conflicts, contention, management complexity and
security overlapGenerally not recommended
Single server, single instance , multi-databaseDifficult to achieve, but gives best utilizationSome resource isolation with Resource GovernorSome security isolation with encryption and extensible key managementSome namespace conflicts (e.g. logins)Shared resource/configuration conflicts (e.g.TempDB, collation)
Consolidation optionsSingle server, multi-Instance
Good resource controls with SQL Server settings (optionally with WSRM)Good security isolation (if best practices are followed)Minimal namespace conflictsFlexible deployment and management modelMulti-version support
Single server, single/multi instances on virtual machinesDifferent virtualization technologies available – ensure only supported vendors/configurations are
used (see SVVP)Sprawl is “virtualized”, but management of instances is not reducedSlightly higher minimum resource overhead per serverLimited scalabilityVirtual machine farm can be implemented for VM portability
Consolidation optionsSingle server, multiple physical partitions
Reduces physical sprawl but limited reduction in licensesUsed in combination with previous models (multi-instance, multi-database)Very good resource and security isolationLimited platform support
Consolidation options
SQL Server 2008/2005 supports up to 50 instancesActual number limited by platform, resources, availability, manageability and security considerations
Physical Server
Physical Server
Windows
VM VM
SQL Server
Test
SQLServerDev SQL
ServerProd
Management Tools
Partition N
Windows
SQLServerApp 2
SQLServer
Test
Management Tools
Child partition 2
Other OS
SQL Server App n
Management Tools
Child partition 1
Windows Server 2008
Rootpartition
Windows Server 2008
SQL Server App 3
Virtual MachineManager
Hypervisor
Management Tools
AgendaConsolidation reviewVirtualization reviewThe real problemsCommon groundRight solution for the problem
Virtual machines overviewTwo or more (mostly) isolated operating systems running concurrently on the same physical machine
Mostly independent operations, access and controls
Commonly run on servers but also useful on desktops/workstations
E.g. Legacy application support, dev/test
Common architectures
Hosted virtualization
Virtual Server, Virtual PC, VM Ware Workstation
Hypervisor virtualization
Hyper-V, VMWare ESX, Xen
x86/x64 Server
Windows Server 2003/2008
Virtualization Service
Guest OSApplication
Guest OSApplication
Virtual Hardware
VM architecture: hosted
VM architecture: hypervisor based
Hardware
Windows hypervisor (hyper-V)
Rootpartition
Servercore
Apps
OS 1 OS 2
Apps Apps
Child partition
Child partition
Windows Server 2008
VSPWindows Kernel
Applications(user mode)
Applications (user mode)
Applications (user mode)
Non-Hypervisor Aware OS
Windows Server 2003, 2008
Windows KernelVSC
VMBus Emulation
“Designed for Windows Server” hardware
Windows hypervisor (scheduler, memory management)
Xen-Enabled Linux Kernel
Linux VSC
Hypercall Adapter
Parent/root partition Child Partitions
VM Service
WMI Provider
VM Worker Processes
OSISV / IHV / OEM
Microsoft Hyper-VMicrosoft / XenSource
User Mode
Kernel Mode
Provided by:
Ring -1
IHV Drivers
VMBus
VMBus
Applications
Hyper-V architecture
Source: Jeff Woosley (Sr. PM) Microsoft Hyper-V, Scenarios and Networking presentation
Example 1: Hyper-V VMs optimizationEach VM on its own network switch
Windows Server 2008 VM 2VM 1
“Designed for Windows” Server Hardware
Windows hypervisor
VM 3
Child Partitions
User Mode
KernelMode
Ring -1MgmtNIC 1MgmtNIC 1
VSwitch 1NIC 2
VSwitch 1NIC 2
VSPVSP
VSP
VSwitch 2NIC 3
VSwitch 2NIC 3
VSwitch 3NIC 4
VSwitch 3NIC 4
Applications Applications Applications
VM Service
WMI Provider
VM Worker Processes
Windows Kernel VSC Windows
KernelVSC Linux Kernel VSC
VMBus VMBus VMBusVMBus
Parent / root partition
Source: HP Corp.
Server Hardware
Hard Partition
Operating System (OS)
Appl
icat
ion
Server Hardware
Hard Partition
Operating System (OS)
Appl
icat
ion
Server Hardware
Hard Partition
Operating System (OS)
Appl
icat
ion
Server Hardware
Hard Partition (nPar)
OS vPar
Appl
icat
ion
OS vPar
Appl
icat
ion
OS vPar
Appl
icat
ion
Virtualization
Server Hardware
Appl
icat
ion
OS
Appl
icat
ion
Appl
icat
ion
Workload Management
Server Hardware (e.g. 6 cpu’s)
Hard Partition (nPar – 6 cpu’s)
Appl
icat
ion
OS (2 fixed, 2 float)
Appl
icat
ion
Appl
icat
ion
Appl
icat
ion
Appl
icat
ion
Appl
icat
ion
OS (2 fixed, 2 float)
Dynamic Workload Management
Dynamic Workload Management
Virtualization
OS Stacking
Workload Mgmt & App Stacking
OS + Application Stacking+ Dynamic Workload Mgmt
One App-One Server
One App-One Server
One App-One Server
Float CPU’s can move dynamically between separate OS’s depending on load, time of day or manual intervention.
Note that resources between multiple separate systems cannot be shared, hence low utilization.
Reduces server hardware, but not OS licenses – need same number of OS licenses + virtualization license e.g. VMware.
Reduces server hardware + OS licenses. Need workload management software or careful configuration to ensure workloads do not negatively impact each other.
Example 2: mixed approach
SQL Server 2008 VM considerationsBoth Hyper-V and Virtual Server 2005 are fully supported
Hyper-V highly recommended
3rd party virtualization vendors supported if running Windows Server 2008 – see important notes and supported vendors
Server Virtualization Validation Programhttp://windowsservercatalog.com/svvp.aspx?svvppage=svvp.htm
Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment http://support.microsoft.com/KB/956893
Update/modify monitoring scripts and/or toolsUpdate templates to monitor both host and guest CPUs using new hypervisor specific PerfMon counters
Implement new tools like Microsoft System Center – Virtual Machine Manager
SQL Server 2008 VM considerationsMid/large servers recommended
4-sockets or higher for growth and high speed PCI slots; Blades/compact server not recommended regardless of CPU/RAM capacity
Multiple VMs per machine supportedTested up to 4 VMs with near linear txn/s increaseSingle user DB per VM, moderate workloadsNote increase in host OS resource utilization (memory, CPU)
CPU and memory utilization comparable to host installationsStorage IO performance comparable to host installation
All SQL Server IO tuning principals and best practices applyUse pass-through disks for data/log filesUse fixed sized, pre-allocated disks
SQL Server 2008 VM considerationsNetwork IO performance impact 10-30%
Can be addressed using multiple NIC
CPU load will also increase if network load is high
3rd party virtualization vendors have specific optimization recommendations
Can be highly secure but be aware of new and different security considerationsRisks from VMs/guest OS (often by internal perpetrators)
Hypervisor vulnerability exposes entire system (all VMs)
Patch management for all VMs and hyper-visor (MS Hyper-V)
Monitor intra-VM chatter, activity patterns and event logs (including entries & dates)
AgendaConsolidation reviewVirtualization reviewThe real problemsCommon groundRight solution for the problem
The real problems:Server sprawl
The real problems:Cost of high availability and disaster recovery
Failover Clustering protects entire instance but 1-1 protection usually hard to justify
Can be setup to protect multiple databases in the same instanceBuild 3-4 node clusters to reduce cost of protection per nodeIncreases complexity
Database mirroring only protects user databases and requires individual effort
Scripting helps, a littleMethods and processes are kept in the senior DBA’s headUp to 2x the administration overhead
Database Mirroring
Failover Cluster
AvailableServer
ComputeCapacity
100% --
75% --
50% --
25% --
0% --One App
One ServerWorkload
FY 2002
AvailableServer
ComputeCapacity
100% --
75% --
50% --
25% --
0% --
One App One ServerWorkload
FY2005
As server capacity continues to increase, the one app-one server model will have even lower utilization rates in the future.
Servers capacity designed for peak demands
Typical utilization is a fraction of peak demandPeak utilization occurs at specific periods
Slow to respond to unexpected workload growth
Resource acquisition and provisioning can take hours or days
The real problems:Inefficient resource allocation/utilization
The real problems:Do more with less
AdministrationToo many servers to manage, monitor, patchDeployment and re-hosting takes too much time and effortCan I really use Management Studio? TSQL scripts? Powershell?
SecurityToo many points to secure; too many keys to manageInconsistent standards and strictnessMore than 1 SA owner
InfrastructureRunning out of power, HVAC and DR capacityBlades and small servers are crowding, overloading data centers
AgendaConsolidation reviewVirtualization reviewThe real problemsCommon groundRight solution for the problem
More than just technology
Technology: Tools & infrastructure
Process: Definition/design, governance, continuous improvement
People: Roles & responsibilities, management, skills development & discipline
Financial: TCO/ROI, business caseCulture: Values, internal politics, reluctance to
changeExternal: Regulatory, legal compliance
15%
85%
Tough issues will not be technical!
Challenges
One-application, many servers cultureFunding of new projects owned by BU’s and internal politicsSoftware vendor support and licensingFunding to plan, test, implement and support consolidation, virtualization & workload management technologiesTypically requires updated development, QA and release to production processes and management technologiesIncompatible hardware and OS versions with older applicationsSecurity challengesApplication and system “time” - multiple time zone issuesTraining – staff needs to be trained to support new technologies
Success factors
Ensure executive sponsor is in placeDoes not guarantee success but lack of usually assures failure
Ensure current and accurate IT inventory is in place. If inventory is not part of regular change management, the inventory will become stale very quickly and lose value;Inventory tools gathering HW/SW info only gather about 70% of data required; non-tool related data includes
Server financials (e.g. purchase date/price, annual maintenance, depreciation)Company Business Unit (BU), division and/or department ownersApplication business criticality – typically depends on recovery time objectives (RTO) and recovery point objectives (RPO)Growth expectations for next 18-24monthsApplication comments on dependencies, constraints and interfaces
Success factors
Design hardware and infrastructure for the long termSupport 24-36 months growth without major upgrade
Add components without re-hostingBlades appear attractive but often the wrong answer – rack sprawl
Storage design is criticalKey considerations are IOPS, MB/s and latency, not GB/TB
Prioritize systems design based onBusiness criticalitySecurityManageabilityScalability and performance
Knowledge and process upgradeNew technologies and operational structure
Hard problems
Business criticalityA lot more eggs in one basketHA and DR implications
SecurityUser level separationRole isolationSecurity keys – electronic (e.g. encryption) and physical (access control)
Application/systems designClashes and conflictsTightly coupled systemsHard dependencies – user or infrastructure induced
OperationsServer, instance, database level tasks – overlaps and oversightsSQL Agent jobs complexityResource allocations, monitoring and charge-backs
HardwareBig iron servers vs. commodity server farmStorage design for load, not size
Really hard problems
PeopleWho really owns the new systems?Conflict resolution path?Which (or whose) vendor to keep?Who is SA? Can you trust SA?How long for developers & DBAs to adopt new methods/practices?
Really, really hard problemConsolidation or virtualization?
AgendaConsolidation reviewVirtualization reviewThe real problemsCommon groundRight solution for the problem
Right solution for the problemConsolidation and virtualization both solve similar problems
Server sprawlImprove resource utilization efficiencyBetter control and improve manageabilityReduce overall costs
Despite significant overlap, consolidation does not require virtualization to be successfulBroad implementation of virtualization does not imply automatic consolidation
The right solutionDespite similarities, some key differences
ConsolidationWill always reduce and merge footprint – ratio varies depending on strategy and technology
Includes license, operations, processes, infrastructure and peopleModerately useful for legacy applications supportRequires organizational re-alignment to be successful
VirtualizationMay or may not reduce or merge footprintRequires very careful planning on storage to take advantage of transportability and HA featuresGreat for supporting legacy applicationsRequires new skills and knowledgeCan be minimally intrusive to IT groups
Additional considerations for the right solutionMotivations for consolidation and/or virtualization (summarized)
Reduce Server sprawl – known and unknownCosts – hard and softComplexity
Regain control (at least some sense of it)Improve resource utilization levelsImprove response time
Operations and supportProjects
SQL Azure……Private cloudDoesn’t solve the problems by itself but makes the problems more manageable
Final thoughtsJust native SQL Server & Windows and/or 3rd party
Variants of application layer based virtualizationVariants of hyper-visor based virtualizationResource management Scale-out with middle tier data path multiplexing
Be wary of “solve-all-problems” claims/benefitsDynamically move instances from one host server to another in secondsRe-use existing hardware but with improved utilization levelsNo application change
Free lunch…… with every bridge purchasedIn our experience, SQL Server & Windows is adequate in most deployments
You may need some help in large scale management
Case study 1 – national retail chainOrganization overview
$1.4 billion revenue550 store locations20% annual business growth rate
Business issuesPoor service levelsReduce business riskInconsistent server utilizationNeeded architecture for growth
Case study 1 – national retail chainOriginal environment
40 IBM xSeries servers with 2 to 16 single core processorsAnnual hardware support costs - $120,000Annual software support costs - $550,000IT server administration staff – 6 FTEsTotal annual server operating expenses - $1,250,000
Business needsIncrease available computing powerImprove service levelsReduce management burdenEstablish architecture for growth
Case study 1 – national retail chain“Low cost” option
17 commodity servers – 4 dual core processors – 16 GB memory68 total processors, 272 total GB memory
Initial hardware purchase price - $395,138Initial software licenses - $1,917,464
Enterprise servers option3 enterprise servers – 16 dual core processors – 64 GB memory
48 total processors, 192 total GB memoryInitial hardware purchase price – $916,154Initial software licenses - $1,295,952
Sample three year TCO comparison
Three Year TCO Comparison
Current Environment
Small/medium servers solution
Enterprise servers solution
Server Hardware $639,387 $504,474 $1,259,001
Server Software $2,268,162 $2,748,971 $2,036,085
IT Operations Labor $1,458,216 $956,952 $540,327Facilities(Power & Space) $171,861 $117,591 $55,029
Total $4,537,626 $4,327,988 $3,890,442
Additional significant business benefits:• Improved availability• Improved agility – time to deploy new systems• No “forklift upgrade” (aka re-host) for 24 months
Consolidation trendsData from 4 cases – various industries
Typically start with dozens to hundreds of 32-bit servers
Commodity servers based design
1:2 to 1:8 server reduction ratio
Enterprise servers based design
1:10 to 1:64 server reduction ratio
Enterprise server base design does not fall back into “server sprawl” problem due to scalability limits
Case study 2: international petro-chemical company
Challenges with management, scalability, performance, DB growth (size & number), limited staffConcerned with availability and recoverabilityInitially decided on small, commodity x64 servers (1-step up from blades)
No requirements for >8cores in the next 3 yearsNo highly complex applicationsNo VLDBLow entry cost
Case study 2: international petro-chemical company
New concerns 6-months after starting consolidationSystem availability, manageabilityUncertainty over “newly discovered” SQL Server BI/OLAPLimited options on consolidationMinor reduction in data center footprint; reduced consolidation ROIMinor reduction in number of servers; reduced estimated savings from operations
Case study 3: international services company
ChallengesUncontrolled database deployments (including under desks)
DBA team cannot keep up with tracking, managing and patching systems
Security risks, business risks and customer data liabilities
Long evaluation cycle resulted in decision to deploy scale-out SQL Server farm using 3rd party virtualization technology
Features and benefits were very attractive on paper and during POC – moving systems around, HA benefits, rapid growth, reuse existing hardware
Case study 3: international services company
About halfway through deploymentManagement efforts mostly the same but complexity increased
Marginal licensing savings
Limited hardware reuse
Instance portability not as easy as initially expected
Full rollback after about 50% deployment
Re-architected native consolidation based on enterprise servers
SummaryConsolidation and virtualization are both strategic and offer valueOne does not require or preclude the otherSolution must consider growth for next 2-3 years – re-hosting is very expensiveTechnology issues can be challenging usually solvable; people issues aren’t always soAnalysis and design should make up >50% of your effortIf at all possible target SQL Server 2008; at the minimum SQL Server 2005 – older versions only if maintaining legacy apps
ResourcesSQL Server consolidation guidance by the Microsoft SQL CAT
http://sqlcat.com/whitepapers/archive/2010/02/04/sql-server-consolidation-guidance.aspx Server consolidation with SQL Server 2008 whitepaper
http://download.microsoft.com/download/6/9/D/69D1FEA7-5B42-437A-B3BA-A4AD13E34EF6/SQLServer2008Consolidation.docx
SQL Server 2008 virtualization using Hyper-Vhttp://sqlcat.com/whitepapers/archive/2008/10/03/running-sql-server-2008-in-a-hyper-v-environment-best-practices-and-performance-recommendations.aspx
Support Policies of SQL Server in virtualized environments http://support.microsoft.com/?id=956893http://blogs.msdn.com/psssql/archive/2008/10/08/sql-server-support-in-a-hardware-virtualization-environment.aspx
Windows Server Virtualization Validation Program (SVVP)http://windowsservercatalog.com/svvp.aspx?svvppage=svvp.htm
Microsoft Assessment and Planning Toolkit• http://technet.microsoft.com/en-us/solutionaccelerators/dd537566.aspx SQL Server 2008 virtualization features, technical & licensing information
http://technet.microsoft.com/en-us/sqlserver/cc895483.aspxhttp://www.microsoft.com/sqlserver/2008/en/us/virtualization.aspx
Track Resources
Resource 1
Resource 2
Resource 3
Resource 4
PowerPoint GuidelinesFont, size, and color for text have been formatted for you in the Slide MasterThis template uses Calibri, a standard Windows Vista/7 and Office 2007/2010 fontUse the color palette shown below
SAMPLE FILLSAMPLE FILL SAMPLE FILL
Sample Fill
Sample Fill
Sample FillSample Fill
Sample Fill
Sample Fill Sample Fill
Sample FillSample Fill
Sample Fill
Primary Secondary
PowerPoint TemplateSubtitle color
Example of a slide with a subheadSet the slide title in “All Caps”Set subheads in “Sentence case”Generally set subhead to 28pt or smaller so it will fit on a single lineThe subhead color is defined for this template but must be selected; In PowerPoint 2007, it is the sixth font color from the left
Hyperlink color: www.microsoft.com
Slide for Showing Software CodeUse this layout to show software code
The font is Consolas, a monospace fontThe slide doesn’t use bullets but levels can be indented using the “Increase List Level” icon on the Home menu
Table Format
Table TitleColumn 1 Column 2 Column 3 Column 4 Column 5
Demo TitleNameTitleCompany
DEMO
DAT Track Scratch 2 Win
Find the DAT Track Surface Table in the Yellow Section of the TLCTry your luck to win a Zune HDSimply scratch the game pieces on the DAT Track Surface Table and Match 3 Zune HDs to win
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
Complete an evaluation on CommNet and enter to win!
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31st
http://northamerica.msteched.com/registration
You can also register at the
North America 2011 kiosk located at registrationJoin us in Atlanta next year
© 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.
JUNE 7-10, 2010 | NEW ORLEANS, LA