Make your Virtualized SQL Servers Top Performers
-
Upload
heraflux -
Category
Data & Analytics
-
view
147 -
download
0
Transcript of Make your Virtualized SQL Servers Top Performers
Make Your Virtualized SQL Servers
Top Performers
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
About David Klee
#devconnections
@kleegeekdavidklee.netgplus.to/kleegeeklinked.com/a/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning & Troubleshooting
• Virtualization• Infrastructure
• High Availability• Disaster Recovery• Capacity Management• Health & Efficiency
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
#devconnections
My SQL Servers run slower now that they are virtual.
Why?
What can I do about it?
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Agenda• Inside the VM layer• Performance monitoring / collection• Bottleneck analysis up the system
stack• Shifting the bottlenecks
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
What is Virtualization?• Abstraction of hardware & OS• Resources & queues• Resources are finite• Queues can be measured
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
#devconnections
Infrastructure & VirtualizationBlack Box
Infrastructure & VirtualizationBlack Box
SQL Server Instance
DB DB DB App App
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Inside the Black Box
#devconnections
CPU SchedulerCPU
ExecutionCPU Scheduling Queue
Memory SchedulerMem
R / WMem Scheduling Queue
Disk SchedulerDisk R / W
Disk Scheduling Queue
Network SchedulerNetwork Tran / Rec
Network Scheduling Queue
VM TASK
VM TASK
VM TASK
VM TASK
VM TASK
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Shared Everything
Hard Limits• Cluster / host resources• Max VM size• CPU / mem count• Storage IOPs /
throughput• Path aggregate
throughput
Soft Limits• CPU queue contention• Memory oversubscription• Variable resource
consumption• Noisy neighbors
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
WHERE TO START?Understand where you are at today.
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Baselines• Critical!• Benchmarks• Baselines• Statistics Collection
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
What To Collect• Environmental– Storage utilization
• Host– Aggregate resource
consumption– Path utilization
• Guest– Resource
consumption– CPU queue waits
• In-Guest– WMI Counters– SQL Server metrics
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Collect & overlay everything• A single counter can lie to you
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Bottleneck Analysis• Systems have bottlenecks• Determine contention points• Where to start?
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
System Stack
#devconnections
Net
wor
king
Net
wor
king
Inte
rcon
nect
sIn
terc
onne
cts
Physical ServerPhysical Server
VirtualizationVirtualization
Operating SystemOperating System
SQL Server InstanceSQL Server Instance
SQL Server DBSQL Server DB
ApplicationApplication
StorageStorage
You are here.
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Waits Analysis• SQL Server waits• WMI / Perfmon stats• Virtual Machine layer• Host layer• Infrastructure layer
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
UP THE SYSTEM STACK
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Storage
#devconnections
ControllerController
ControllerController
LUNLUN
LUNLUN
LUNLUN
LUNLUN
Disk PoolDisk PoolSANSANLUNLUN
LUNLUN
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Storage• Single largest pain
point• Latency & IOPs• HBA Queue depth• Path bottlenecks• Multipathing
• Use less I/O• Improve disk
configuration• SSDs• Spread out
workload
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
#devconnections
SAN
DB
E:
FG1
FG2
DF4
DF3
DF2
DF1
G:
F:
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Storage• Maximums– SQLIO– SQLIO Batch
bit.ly/1mEAS9W
• Overlaysteadystate (WMI)
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Network• Network latency & throughput test• iperf - How-To Guide: tinyurl.com/ost9gll
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
VM Proximity• Network-heavy VMs on same host
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Physical Machine• CPU / memory / uplinks• Queue times• Highest performing equipment• No memory overcommitment
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Virtual Machine• Spread out the I/O• Resource prioritization• “Right-Sizing” analysis– Amount of vCPUs / memory– Analyze your current usage carefully– Balancing needs with physical constraints
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Virtual Machine• vNUMA configuration matters
#devconnections
31% Difference!
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
SQL Server Instance• Reduce resource scheduling while
maximizing performance• Max Degree of Parallelism• Cost Threshold for Parallelism• Large pages
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
SQL Server Database• Spread out the I/O– File groups, data files, partitions
• Reduce I/O– Table / index compression– In-memory constructs–More RAM
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Application• Query tuning• Data handling improvements• Take advantage of SQL Server features
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
Conclusions• Shift the Bottleneck• Workload “Right-Sizing”• Better Performance• Reduced Resource Consumption• Higher Consolidation
#devconnections
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
QUESTIONS?
#devconnections
davidklee.net @kleegeek
MAKE YOUR VIRTUALIZED SQL SERVERS TOP PERFORMERS
THANK YOU!
#devconnections
SESSION TITLE
#devconnections
Rate This Session Now!Rate with Mobile App:1. Select the session from the
Agenda or Speakers menus
2. Select the Actions tab
3. Click Rate Session
Rate Using Our Website:1. Register at www.devconnections.com/logintoratesession
2. Go to www.devconnections.com/ratesession
3. Select this session from the list and rate it
Tell Us What
You Thought
of This Session
Be Entered to
WINPrizes!