download it from here


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

download it from here

  1. 1. SQL Server on VMware Jonathan Kehayias (MCTS, MCITP) SQL Database Administrator Tampa, FL
  2. 2. Agenda <ul><li>SQL Initiative Overview </li></ul><ul><li>Performance Metrics </li></ul><ul><ul><li>I/O Metrics </li></ul></ul><ul><ul><li>Processor </li></ul></ul><ul><ul><li>Performance Counters </li></ul></ul><ul><li>High Availability Configuration </li></ul><ul><li>Manageability Gains </li></ul>
  3. 3. SQL Initiative <ul><li>Primary Objective </li></ul><ul><ul><li>Disaster Recovery </li></ul></ul><ul><li>Success Criteria </li></ul><ul><ul><li>Immediate failover to remote data center with minimal data loss </li></ul></ul><ul><ul><li>Performance </li></ul></ul>
  4. 4. Performance VMware ESX Server, 3.0.2, 63195
  5. 5. Performance SQL Virtual Machine Configuration
  6. 6. Performance SQLIO Benchmarks <ul><li>SQLIO is a tool provided by Microsoft which can also be used to determine the I/O capacity of a given configuration. </li></ul><ul><li>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. </li></ul><ul><li>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. </li></ul>
  7. 7. Performance (VMWare) Random Read I/O By The Numbers <ul><li>Drive Format Test IOs/sec MBs/sec </li></ul><ul><li>READ </li></ul><ul><li>Default Read 8KB random 2286.33 17.86 Default Read 64KB random 1940.86 121.30 Default Read 128KB random 1059.25 132.40 Default Read 256KB random 500.54 125.13 Default Read 8KB sequential 2549.82 19.92 Default Read 64KB sequential 1397.24 87.32 Default Read 128KB sequential 766.72 95.84 Default Read 256KB sequential 466.00 116.50 WRITE Default Write 8KB Random 1475.78 11.52 Default Write 64KB Random 609.97 38.12 Default Write 128KB Random 366.03 45.75 Default Write 256KB Random 210.17 52.54 Default Write 8KB Sequential 1560.25 12.18 Default Write 64KB Sequential 634.69 39.66 Default Write 128KB sequential 222.10 27.76 Default Write 256KB sequential 165.52 41.38 </li></ul>
  8. 8. Dell PowerEdge 6650 2x 2.7 GHz 2GB RAM 4x 36GB RAID 10 array <ul><li>Drive Format Test IOs/sec MBs/sec </li></ul><ul><li>READ </li></ul><ul><li>Default Read 8KB random 656 5.1 Default Read 64KB random 258 16.1 Default Read 128KB random 149 18.6 Default Read 256KB random 82 20.4 Default Read 8KB sequential 3246 25.4 Default Read 64KB sequential 378 23.6 Default Read 128KB sequential 188 23.5 Default Read 256KB sequential 94 23.5 WRITE Default Write 8KB Random 1567 12.2 Default Write 64KB Random 809 50.5 Default Write 128KB Random 486 60.7 Default Write 256KB Random 333 83.2 Default Write 8KB Sequential 7112 55.6 Default Write 64KB Sequential 1889 118.1 Default Write 128KB sequential 977 122.1 Default Write 256KB sequential 494 123.5 </li></ul><ul><li>Physical SQLIO outputs were obtained from the SQL Server Performance website Forums: </li></ul><ul><li> </li></ul>
  9. 9. Dual 3.0Ghz Xeon Dual 2GB FC HBA IBM DS4300 SAN RAID 10 (10 x 74GB 15K) <ul><li>Drive Format Test IOs/sec MBs/sec SQLIO 8k sector </li></ul><ul><li>Read - Random 2096.15 16.38 Read - Sequential 3651.36 28.53 Write - Random 1985.08 15.51 Write - Sequential 1914.68 14.96 SQLIO 32k sector </li></ul><ul><li>Read - Random 1653.85 51.68 Read - Sequential 2736.05 85.50 Write - Random 1125.63 35.18 Write - Sequential 1337.12 41.79 SQLIO 64k sector Read - Random 1280.91 80.06 Read - Sequential 1889.55 118.10 Write - Random 724.24 45.27 Write - Sequential 889.01 55.56 </li></ul><ul><li>Physical SQLIO outputs were obtained from the SQL Server Performance website Forums: </li></ul><ul><li> </li></ul>
  10. 10. DELL 6850 Quad Xeon 3.4ghz w/4GB RAM EMC Clariion CX-700 RAID 10 <ul><li>Drive Format Test IOs/sec MBs/sec </li></ul><ul><li>8k random write: 14884.96 116.28 64k random write: 1573.03 98.31 128k random write: 1110.79 138.84 256k random write: 722.48 180.62 8k seq. write: 16545.36 129.26 64k seq. write: 3142.00 196.37 128k seq. write: 1573.62 196.70 256k seq. write: 787.21 196.80 8k random read: 5776.05 45.12 64k random read: 2857.16 178.57 128k random read: 1567.23 195.90 256k random read: 787.22 196.80 8k seq. read: 9200.54 71.87 64k seq. read: 2805.23 175.32 128k seq. read: 1506.95 188.36 256k seq. read: 783.07 195.76 </li></ul><ul><li>Physical SQLIO outputs were obtained from the SQL Server Performance website Forums: </li></ul><ul><li> </li></ul>
  11. 11. Performance Performance Counter Monitoring <ul><li>To understand how well a SQL Server is performing the SQL Server as well as Windows Subsystem Performance Counters need to be Monitored. </li></ul><ul><li>Key Counters to monitor include: </li></ul><ul><ul><li>Processor/%Processor Time should remain below 80%. </li></ul></ul><ul><ul><li>Processor/%Privileged Time should remain below 20% </li></ul></ul><ul><ul><li>SQL Server General/User Connections </li></ul></ul><ul><ul><li>Batches/Sec </li></ul></ul><ul><ul><li>Page Life Expectancy </li></ul></ul><ul><ul><li>Pages/Sec </li></ul></ul><ul><ul><li>Memory Grants Pending </li></ul></ul><ul><ul><li>Lazy Writes/sec </li></ul></ul><ul><li>For further information, take a look at the following Screencast series by Kevin Kline (SQL Server MVP and Professional Association for SQL Server (PASS) President): </li></ul><ul><li>,295582,sid87_gci1302600,00.html </li></ul>
  12. 12. Performance Performance Counters (%Processor Time) < 80% average
  13. 13. Performance Performance Counters (ProcessorPrivileged Time) < 20% Average
  14. 14. Performance Performance Counters (User Connections) This is just a reference counter to be used in tandem with other counters to view system activity.
  15. 15. 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.
  16. 16. Performance Performance Counters (Buffer Cache) Should remain as close to 100% as possible. Consistent drops below 95-90% signals Memory Pressure
  17. 17. 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.
  18. 18. 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.
  19. 19. Performance Conclusions <ul><li>1: Compared to various disk configurations of physical implementations with local storage, we experience 10x performance for disk subsystem I/O </li></ul><ul><li>2: Critical performance counters SQL maintains industry acceptable performance </li></ul><ul><li>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. </li></ul>
  20. 20. <ul><li>Single SQL server per ESX host </li></ul><ul><ul><li>Multiple SQL Servers never reside on the same ESX host </li></ul></ul><ul><li>Logical placement of VM’s to eliminate contention of resources </li></ul><ul><ul><li>Web and App server never communicate with the SQL server on the same host </li></ul></ul>Consolidation Architecture
  21. 21. High Availability <ul><li>SAN Storage Mirrored for Disaster Recovery to Chicago Datacenter. </li></ul><ul><li>Quarterly Failover Tests of key SQL Servers on Chicago Network with zero data loss at failover. </li></ul>
  22. 22. High Availability <ul><li>VMotion </li></ul><ul><ul><li>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 </li></ul></ul><ul><ul><li>Allows live migration of Servers during high load operation to shift load to more powerful hosts as needed. </li></ul></ul>
  23. 23. Manageability <ul><li>Snapshot Technology </li></ul><ul><ul><li>Provides a point in time recovery point for risky operations such as upgrading Server OS and or SQL Server. </li></ul></ul><ul><li>Hot Add Disk Arrays </li></ul><ul><ul><li>Allows Zero Down Time additions of new Storage LUNS as database grow in size </li></ul></ul><ul><li>HBA Load Balancing </li></ul><ul><ul><li>Allows Disk I/O Load balancing across redundant paths to the SAN storage. </li></ul></ul>
  24. 24. Manageability <ul><li>Rapid Scale Up </li></ul><ul><ul><li>Adding additional vCPU’s and Memory is only a reboot away, provided the host has available resources. </li></ul></ul><ul><ul><li>Easily upsize a server for end of month processing when it requires the most power while minimizing its footprint while under minimal load. </li></ul></ul>
  25. 25. Manageability <ul><li>VMWare Infrastructure Client </li></ul><ul><ul><li>Immediate shared console level access to the SQL Server provides remote administration and rapid response for critical server outages. </li></ul></ul><ul><ul><li>No risk of a BSOD requiring physical access to the server or of a stuck ILO interface on a server. </li></ul></ul><ul><ul><li>Integrated performance monitoring of processor, memory, disk and networking counters. </li></ul></ul>
  26. 26. Manageability <ul><li>VMWare Infrastructure Client (cont’d) </li></ul><ul><ul><li>Running history of Events occurring through the client including Server Resets, Migrations, and Reconfigurations. </li></ul></ul><ul><ul><li>Integrated Alarms are configurable for out of tolerance counter statuses. </li></ul></ul>
  27. 27. Lessons Learned <ul><li>1: Don’t lock pages in memory if you plan to do VMotion. </li></ul><ul><li>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. </li></ul><ul><li>3: Don’t accept a vendor’s statement that VMware is the problem – look deeper, and you can generally disprove this statement. </li></ul>
  28. 28. Conclusions <ul><li>Performance Metrics </li></ul><ul><ul><li>I/O Metrics – 10x performance, Processor and Performance Counters </li></ul></ul><ul><li>High Availability Configuration </li></ul><ul><ul><li>VMotion to load balance during end of month reconciliations keeps ahead of the business </li></ul></ul><ul><ul><li>Reduced downtime with hot add disk </li></ul></ul><ul><li>Manageability Gains </li></ul><ul><ul><li>SOX compliance for Disaster Recovery </li></ul></ul><ul><ul><li>Virtual Center Console for team collaboration </li></ul></ul><ul><li>Cost Avoidance </li></ul><ul><ul><li>Reduces need for Mirroring hardware and software </li></ul></ul><ul><ul><li>Consolidation of hardware both primary and DR </li></ul></ul>