SQL Server on VMware Jonathan Kehayias (MCTS, MCITP) SQL Database Administrator Tampa, FL
SQL Initiative Overview
High Availability Configuration
Immediate failover to remote data center with minimal data loss
Performance VMware ESX Server, 3.0.2, 63195
Performance SQL Virtual Machine Configuration
Performance SQLIO Benchmarks
SQLIO is a tool provided by Microsoft which can also be used to determine the I/O capacity of a given configuration.
SQL Server stores data 8K pages allocated in blocks of 8 as 64K extents. Typical SQL I/O operations involve Random Reads of extenteRs from disk.
SQLIO benchmarks on this SQL Server for 64K Random Read I/O with 2 threads simulating the recommended setting of one file per processor core for SQL Server were equivalent or better than common physical hardware.
Performance (VMWare) Random Read I/O By The Numbers
Performance Performance Counters (%Processor Time) < 80% average
Performance Performance Counters (ProcessorPrivileged Time) < 20% Average
Performance Performance Counters (User Connections) This is just a reference counter to be used in tandem with other counters to view system activity.
Performance Performance Counters (Batches/sec) This is a reference to the amount of activity the Server is performing. It is used along with other counters like Page Splits/sec to determine if there are problems.
Performance Performance Counters (Buffer Cache) Should remain as close to 100% as possible. Consistent drops below 95-90% signals Memory Pressure
Performance Performance Counters (Page Life Expectance) Page Life in the cache should ideally remain over 300 seconds. Consistent drops below this should be investigated and can signal Memory Pressure on the server.
Performance Performance Counters (Memory pages/sec) The rate at which pages are read from or written to disk. If > 100 on a slow disk subsystem or > 600 on a fast disk subsystem it should be investigated.
1: Compared to various disk configurations of physical implementations with local storage, we experience 10x performance for disk subsystem I/O
2: Critical performance counters SQL maintains industry acceptable performance
3: Ability to consolidate multiple VMs along with SQL server, ~5 to 7:1 to save costs on physical hardware, rack space, power, cooling and integrate into DR plan.
Single SQL server per ESX host
Multiple SQL Servers never reside on the same ESX host
Logical placement of VM’s to eliminate contention of resources
Web and App server never communicate with the SQL server on the same host
SAN Storage Mirrored for Disaster Recovery to Chicago Datacenter.
Quarterly Failover Tests of key SQL Servers on Chicago Network with zero data loss at failover.
Eliminates need for Mirroring Solutions for Hardware redundancy. In the event of a host hardware failure the Virtual Machines can be hot migrated to another host
Allows live migration of Servers during high load operation to shift load to more powerful hosts as needed.
Provides a point in time recovery point for risky operations such as upgrading Server OS and or SQL Server.
Hot Add Disk Arrays
Allows Zero Down Time additions of new Storage LUNS as database grow in size
HBA Load Balancing
Allows Disk I/O Load balancing across redundant paths to the SAN storage.
Rapid Scale Up
Adding additional vCPU’s and Memory is only a reboot away, provided the host has available resources.
Easily upsize a server for end of month processing when it requires the most power while minimizing its footprint while under minimal load.
VMWare Infrastructure Client
Immediate shared console level access to the SQL Server provides remote administration and rapid response for critical server outages.
No risk of a BSOD requiring physical access to the server or of a stuck ILO interface on a server.
Integrated performance monitoring of processor, memory, disk and networking counters.
VMWare Infrastructure Client (cont’d)
Running history of Events occurring through the client including Server Resets, Migrations, and Reconfigurations.
Integrated Alarms are configurable for out of tolerance counter statuses.
1: Don’t lock pages in memory if you plan to do VMotion.
2: Be cautious when implementing Microsoft Recommended Best Practices that affect system configurations and test in Development before deploying in Production. Some may not be compatible with VMotion.
3: Don’t accept a vendor’s statement that VMware is the problem – look deeper, and you can generally disprove this statement.
I/O Metrics – 10x performance, Processor and Performance Counters
High Availability Configuration
VMotion to load balance during end of month reconciliations keeps ahead of the business