Gavin Payne Senior Consultant gavin@coeo.com
Getting Started with SQL Server and Virtualisation Designing successful virtual database environments Monitoring a virtual database environments Summary
The SQL Server engine works when virtualised Its internal behaviour does not change as a result There are no error messages used exclusively for virtualised installations
As in the physical world, SQL Server needs resources Virtualisation does not create more resources Problems are typically caused by: Not sizing the virtual machine correctly Not understanding how the hypervisor works Not understanding the VM s I/O requirements
Web Server Operating System Database Server Operating System Mail Server Operating System Domain Controller Operating System Virtual Machine Database Server Operating System Virtual Machine Web Server Operating System Virtual Machine Virtual Machine Virtual Machine Virtual Machine Resource Pool Hypervisor Physical Host Server Physical Host Server Physical Host Server Storage Area Network
Application and ETL Logic Application and ETL Logic Database Data Storage Database Data Storage SQL Server Engine SQL Server Engine Operating System Server Hardware Operating System SHARED Hypervisor SHARED Server Hardware SHARED Storage Area Network Physical World Virtual World
What Makes a Good Candidate? Memory Virtualisation Platform Storage
What makes a good candidate for virtualisation? Don t measure the server s hardware spec: small, medium or large Measure its workload: quiet, active and busy Virtualising quiet servers is now almost the norm Virtualising active servers usually goes well Virtualising busy servers needs planning
Does the server need any extended requirements? Windows Failover Clustering Check vendor support, use a single HA service Synchronous Disaster Recovery Incorporate SAN vendor s multi-lun advice Real time applications or Sync Database Mirroring Monitor CPU Ready values
Perception vs. Reality Startup/Reservation vs. Maximum/Limit What s the difference between the two for me? How much does Windows think it will always have? Does the host server have enough physical memory? How much is enough? Memory Reclamation What methods will the hypervisor use to reclaim memory? Does the system sizing make this likely? How can I tell when it does?
Scalability Ensure 64-bit compatibility for scale-up Deploy by default but some hypervisors need patches Host server headroom It s likely you ll need more memory Hot-add memory support Currently Enterprise edition only, Standard for Denali.
Physical host servers Same specification? Physical Host Server Upgradability? Hardware NUMA boundaries in place?
Hypervisor and management software Version and service pack? Additional features? HA/vMotion/DRS LiveMigrate/Failover clustering Hypervisor Physical Host Server Management, Alerting and Reporting Integration
Resource Pools Do they have enough resources? Prioritisation between RPs? Prioritisation between VMs within each Resource Pool? Workload schedules with other RPs Virtual Machine Virtual Machine Resource Pool Hypervisor Physical Host Server
Local server storage Be able to isolate parallel workloads Between data/log/tempdb as well as between VMs Physical Host Server Avoid one large RAID5 array Avoid one large NTFS/VMFS partition
SAN/NAS Where s the SAN s bottleneck? VM to HBA to Controller ratio? Storage Area Network Workload schedules with other heavy I/O users? Will snapshotting or LUN level backups be used?
I/O Throttling New feature in vsphere 4.1/5.0 Is any in place? Having some could be good Storage Area Network Could be artificial or a deliberate hardware bottleneck e.g. 1Gb HBAs
Hypervisor Virtual Servers Storage Where you monitor host level events will depend on your hypervisor
Hypervisor Configuration Get access to the management tools vsphere vcenter or Hyper-V/VMM Admin Even if read-only Hypervisor Physical Host Server Be able to confirm your resource allocations Check your underlying host server configurations
Hypervisor Activity Performance reports Per Host, per Resource Pool, per VM Hypervisor Physical Host Server Detect virtual server movements Failovers, Migrations, then ask why? See alerts, warnings, thresholds breached
Knowing the Neighbours Which other virtual servers do you share resources with? Hypervisor Physical Host Server How tightly do you share resources? Map your combined workload schedules Build a 24/7 timetable of activity
Additional CPU & I/O Monitoring Log the CPU type before any intensive processes get-wmiobject Win32_Processor select Name, MaxClockSpeed Measure CPU utilisation from the hypervisor %Guest Run Time in Hyper-V Log the runtime of a recent I/O bound task If you don t have one, create a small one
Monitoring Memory Compare Target Memory to Total Memory Monitor Available Memory and PLE Understand how Working set trimming and Lock Pages in Memory affect you Understand how to detect your hypervisor reclaiming memory from SQL Server
Latency From the virtual servers and the host servers Standard target of <15ms Storage Area Network Throughput Monitor per LUN on the SAN Monitor the SAN s total bandwidth