SlideShare ist ein Scribd-Unternehmen logo
1 von 46
“Right-Sizing” Your
SQL Server VM
DBA-304David Klee, Founder
Heraflux Technologies
I want more compute resources
on my SQL Server.
My VM admin wants to take some away.
What is the right answer?
Recurring Question
About David Klee
@kleegeek
davidklee.net
gplus.to/kleegeek
linked.com/a/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning
• Virtualization
• Infrastructure
• Troubleshooting
• High Availability
• Disaster Recovery
• Capacity Management
• Health & Efficiency
Please silence
cell phones
Explore Everything PASS Has to Offer
Free SQL Server and BI Web Events Free 1-day Training Events Regional Event
Local User Groups Around
the World
Free Online Technical Training
This is Community Business Analytics Training
Session Recordings PASS Newsletter
Session Evaluations
ways to access
Go to
passsummit.com/evals
Download the GuideBook App
and search: PASS Summit 2014
Follow the QR code link displayed
on session signage throughout the
conference venue and in the
program guide
Submit by 11:59 PM EST
Friday Nov. 7 to
WIN prizes
Your feedback is
important and valuable.
Evaluation Deadline:
11:59 PM EST, Sunday Nov. 16
• What is “right-sizing”, and why
• Profiling the system stack components
• CPU / memory / storage
• Analyzing environment
• Workload analysis
• Perfmon data review
Agenda
• Abstraction layer between hardware and OS
• Resources
• Queues
• Limits in the environment
• Resource limitations (hard)
• Queue contention (soft)
What Is Virtualization - for DBAs?
• VM resource allocations
• vCPU
• Memory
• Storage presentation
• One size does not fit all workloads
• Inappropriate resource allocations
can hurt VM performance
“Right-Sizing”?
• Single compute node hardware
• Total cluster compute capacity
• Storage speed (IOPs, throughput)
• VM maximums
• Interconnect path speed
Hard Limits (Resources) Soft Limits (Queues)
• Memory oversubscription
• CPU scheduler contention
• Shared resource utilization
• Variable resource utilization levels
• “Noisy Neighbors”
Hard vs. Soft Limits
Resources
150
GHz
CPU
4 TB
Memory
4x10GbE
Network
20 TB
Tier 1
Storage
40 TB
Tier 2
Storage
VM
16 vCPU
128 GB vRAM
VM
8 vCPU
64 GB vRAM
VM
2 vCPU
16 GB
vRAM
VM
2 vCPU
16 GB
vRAM
VM
2 vCPU
16 GB
vRAM
VM
2 vCPU
16 GB
vRAM
VM
2 vCPU
16 GB
vRAM
VM
2 vCPU
16 GB
vRAM
V I R T U A L I Z A T I O N
Queues
Hypervisor
CPU Scheduler
CPU
Execution
CPU Scheduling Queue
Memory Allocator
Mem
R / W
Mem Allocation Queue
Disk Scheduler
Disk
R / W
Disk Scheduling Queue
Network Scheduler
Network
Tran / Rec
Network Scheduling Queue
VM TASK
VM TASK
VM TASK
VM TASK
VM TASK
• Resource limits are easy to detect / work around
• Queue contention much harder
• Time in queue = time lost from VM
• Silent performance killer
• Everything in a VM must be scheduled
• … including idle resources
• Queue processing is not always FIFO
Goal: Minimize Queue Waits
Four vCPU Scheduling
VM
SMPTASKS
vCPU0
vCPU1
vCPU2
vCPU3
vCPU scheduling queues by pCPU core
Scheduling queue waits
High vCPU queue contention
Two vCPU Scheduling
VM
SMPTASKS
vCPU0
vCPU1
vCPU scheduling queues by pCPU core
Scheduling queue waits
High vCPU queue contention
• 24x7 performance metric
collection
• CRITICAL
• Metrics from every piece
of the system stack
Performance Metric Collection
Networking
Interconnects
Physical Server
Virtualization
Operating System
SQL Server Instance
SQL Server DB
Application
Storage
• SQL Server
• Raw CPU / mem / disk
usage
• NUMA memory usage
• Signal waits
• Storage latency by DB file
• Wait statistics
• Glenn Berry @ bit.ly/1wdMB8n
Which High Level Metrics?
• Windows
• CPU & memory consumption
• Storage IOPs / latency /
throughput
• Processes (SQL Server vs other)
• Perfmon how-to @ bit.ly/1sqSVns
• @ bit.ly/1xW4jzJ
Capture all metrics as granularly as possible!
• Virtualization
• Resource consumption by
VM
• Resource utilization by host
• CPU scheduling queue wait
• Overcommitment metrics
• VMware vSphere: CPU Ready
• MS Hyper-V: CPU Wait Time
per Dispatch
Which High Level Metrics?
• Storage
• IOPs / latency / throughput
• By LUN
• By disk group
• Controller
• Interconnect path utilization
• Controller cache hit metrics
Capture all metrics as granularly as possible!
• Overlay all data streams
• Understand / classify:
• Workload periods
• Workload sources
• Business time period
• Goal: metrics by time
period
How to Analyze
• Median & Percentile analysis
• Explain & filter statistical
anomalies
• Statistics
• Min / Average / Max / Median
• Percentile
How to Size vCPUs
• vCPU counts matter!
• Size for what you need today
• Too many vCPUs = BAD (probably)
• Too few vCPUs = BAD (usually)
• Workload / server specific
vCPU Sizing
• Not done at just vCPU count
• vNUMA configuration also matters
• Closely align with pNUMA
• Adds efficiency by aligning with underlying hardware
• Performance difference improves with larger VMs
CPU Sizing - NUMA
• Get physical machine configuration
• Try to fit VM inside one NUMA node
• Otherwise, balance across number
of NUMA nodes
• Test configurations for best results
CPU Sizing - vNUMA
• Example: 16 vCPU VM
• What’s better?
• 2 vSocket x 8 vCore?
• 4 vSocket x 4 vCore?
• 8 vSocket x 2 vCore?
• Varies by workload,
hardware
• Test it for yourself!
CPU Sizing – vNUMA Results
0
100000
200000
300000
400000
500000
600000
700000
800000
900000
8 16 64 256
Transactions/min Concurrent HammerDB Users
vNUMA SQL Server Scalability - 16 vCPUs - HammerDB
4socket x 4CPU 8socket x 2CPU 2socket x 8CPU
• SQL Server
• CPU consumption by DB
• Top waits
• Signal waits
• Scrape parallelism from
execution plan @
bit.ly/1rTs9UX
CPU - Metrics
• Windows
• CPU usage per core
• SQL Server vs. background
• VM Host
• CPU utilization over 80%
• VM CPU queue waits high
• Understand the workload parallelism, concurrent volume
• Determine averages, maximums, and percentiles
• Determine the appropriate profiling period
• < 40% utilization avg – too many CPUs
• > 60% utilization avg – too few CPUs
• Factor CPU waits inside SQL Server
• Vary according to your circumstances
How To Size vCPUs
How To Size vRAM
• SQL Server data must be in buffer pool
• More memory ≈ less I/O
• Less I/O = less waiting on shared storage & queues
• NO HOST MEMORY OVERCOMMITMENT
• Too much memory = lower VM consolidation ratio
• Balancing act
Memory
• SQL Server
• Page Life Expectancy
• Buffer Cache Hit Ratio
• High page fault count
• High recompile ratio
• RESOURCE_SEMAPHORE
waits
• Memory grants pending
Memory - Metrics
• Windows
• MB free
• Paging
• VM Host
• Memory consumption > 90%
• Memory ballooning /
dynamic memory expansion
• How much memory?
• Slow storage? More RAM!
• Fast storage? Less RAM?
• More RAM = less host-level consolidation
• More SQL Server licensing (possibly)
• Table / index compression
How To Size vRAM
Handling Storage
• Much less variable in nature
• Most shared resource
• Most critical
• Most complex
• Most problematic
• Slowest piece of the stack
• Random I/O disk patterns
• Many individual points of contention
Storage
Storage – Contention Points
Controller
Controller
LUN
LUN
LUN
LUN
Disk Pool
VM
VM
VM
VM
• Test raw performance
• SQLIO Batch
bit.ly/1mEAS9W
• DiskSpd
bit.ly/1CeQauw
• Collect metrics:
• I/Os per second (IOPs)
• Latency (ms)
• Throughput (MB/s)
Storage - Maximums
0.00
10000.00
20000.00
30000.00
40000.00
50000.00
60000.00
70000.00
1 2 4 8 16 32 64 128
IOps Thread Intensity
IOps Per Operations per Thread
Sequential Read
Random Read
Sequential Write
Random Write
Storage – Spread Out Workload SAN
DB
E:
FG1
FG2
DF4
DF3
DF2
DF1
G:
F:
WindowsServerOSx
Virtualization
Hardware
HBA4HBA3HBA2HBA1
InterconnectSwitch
Controller1Controller2
SANDiskGroup
LUN2LUN1
HBA4HBA3HBA2HBA1
Steady-State Review
• Determine your runtime stats & percentiles
• Determine load thresholds
• Review estimated requirements
• Change VM configuration
• Incremental changes, not huge ones
• Test and retest
Collected Metrics - Now What?
Metric Review Sample
• Workloads & applications change
• DBs are added / removed
• Perform a right-sizing analysis as necessary
• Adjust the VM resources accordingly
• Recommended: Periodic review of VM sizing
• Quarterly for volatile environments
Not a One-Time Process
• One VM size does not fit all workloads
• Profile and record your workload performance
characteristics
• Analyze the numbers
• Adjust VM configuration and validate
• Repeat as often as your workload changes
Summary
This is a pain!
Shouldn’t this be easier?
But Wait!
Introducing…
• Automate the estimation of a VM’s
“right-sized” resource assignment
•FREE!
• Beta to be available
soon!
SQL Server VM “Right Size” Estimator
Scripts Available:
www.davidklee.net
Contact Me!
davidklee.net @kleegeek
Questions?
Thanks for attending!

Weitere ähnliche Inhalte

Was ist angesagt?

Sistemas operativos ficha formativa nº3 - resolução
Sistemas operativos   ficha formativa nº3 - resoluçãoSistemas operativos   ficha formativa nº3 - resolução
Sistemas operativos ficha formativa nº3 - resolução
teacherpereira
 
Redes de computadores II - 4.Camada de Transporte TCP e UDP
Redes de computadores II - 4.Camada de Transporte TCP e UDPRedes de computadores II - 4.Camada de Transporte TCP e UDP
Redes de computadores II - 4.Camada de Transporte TCP e UDP
Mauro Tapajós
 

Was ist angesagt? (20)

Aula 2 introdução a sistemas distribuídos
Aula 2   introdução a sistemas distribuídosAula 2   introdução a sistemas distribuídos
Aula 2 introdução a sistemas distribuídos
 
Sistemas operativos ficha formativa nº3 - resolução
Sistemas operativos   ficha formativa nº3 - resoluçãoSistemas operativos   ficha formativa nº3 - resolução
Sistemas operativos ficha formativa nº3 - resolução
 
Understanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache CassandraUnderstanding Data Consistency in Apache Cassandra
Understanding Data Consistency in Apache Cassandra
 
[IGC 2017] 우리는 슬랙(Slack) 한다
[IGC 2017] 우리는 슬랙(Slack) 한다[IGC 2017] 우리는 슬랙(Slack) 한다
[IGC 2017] 우리는 슬랙(Slack) 한다
 
Presentation php
Presentation phpPresentation php
Presentation php
 
라이브 스트리밍을 위한 알맞은 솔루션 선택하기 - AWS 서비스 및  CJ 올리브네트웍스의 라이브 커머스 사례 소개 - 이보길 AWS 테크...
라이브 스트리밍을 위한 알맞은 솔루션 선택하기 - AWS 서비스 및  CJ 올리브네트웍스의 라이브 커머스 사례 소개 - 이보길 AWS 테크...라이브 스트리밍을 위한 알맞은 솔루션 선택하기 - AWS 서비스 및  CJ 올리브네트웍스의 라이브 커머스 사례 소개 - 이보길 AWS 테크...
라이브 스트리밍을 위한 알맞은 솔루션 선택하기 - AWS 서비스 및  CJ 올리브네트웍스의 라이브 커머스 사례 소개 - 이보길 AWS 테크...
 
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin ZhangLinux Block Cache Practice on Ceph BlueStore - Junxin Zhang
Linux Block Cache Practice on Ceph BlueStore - Junxin Zhang
 
Redes de computadores II - 4.Camada de Transporte TCP e UDP
Redes de computadores II - 4.Camada de Transporte TCP e UDPRedes de computadores II - 4.Camada de Transporte TCP e UDP
Redes de computadores II - 4.Camada de Transporte TCP e UDP
 
Introducing Xen Server
Introducing Xen ServerIntroducing Xen Server
Introducing Xen Server
 
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless W...
 
Aula 06 comandos linux
Aula 06   comandos linuxAula 06   comandos linux
Aula 06 comandos linux
 
Paradigmas de Linguagens de Programação: Conceitos de PHP
Paradigmas de Linguagens de Programação: Conceitos de PHPParadigmas de Linguagens de Programação: Conceitos de PHP
Paradigmas de Linguagens de Programação: Conceitos de PHP
 
HPE SimpliVity
HPE SimpliVityHPE SimpliVity
HPE SimpliVity
 
Gerência de Processos: Processos
Gerência de Processos: ProcessosGerência de Processos: Processos
Gerência de Processos: Processos
 
conteúdos UFCD 0771.ppt
conteúdos UFCD 0771.pptconteúdos UFCD 0771.ppt
conteúdos UFCD 0771.ppt
 
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...
 
Managing Websphere Application Server certificates
Managing Websphere Application Server certificatesManaging Websphere Application Server certificates
Managing Websphere Application Server certificates
 
Advanced format for hard disk drives
Advanced format for hard disk drivesAdvanced format for hard disk drives
Advanced format for hard disk drives
 
GS Neotek aws_Amazon_CloudFrontDay2018_session3
GS Neotek aws_Amazon_CloudFrontDay2018_session3GS Neotek aws_Amazon_CloudFrontDay2018_session3
GS Neotek aws_Amazon_CloudFrontDay2018_session3
 
Módulo 3-Sistema Operativo Servidor - V3.pdf
Módulo 3-Sistema Operativo Servidor - V3.pdfMódulo 3-Sistema Operativo Servidor - V3.pdf
Módulo 3-Sistema Operativo Servidor - V3.pdf
 

Andere mochten auch

Capacity Planning for Cloud Computing
Capacity Planning for Cloud ComputingCapacity Planning for Cloud Computing
Capacity Planning for Cloud Computing
Adrian Cockcroft
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
MongoDB
 
Strategic capacity planning for products and services
Strategic capacity planning for products and servicesStrategic capacity planning for products and services
Strategic capacity planning for products and services
gerlyn bonus
 

Andere mochten auch (11)

Hardware planning & sizing for sql server
Hardware planning & sizing for sql serverHardware planning & sizing for sql server
Hardware planning & sizing for sql server
 
Lev altimetrico trab. campo 01 - r03 (1)
Lev altimetrico   trab. campo 01 - r03 (1)Lev altimetrico   trab. campo 01 - r03 (1)
Lev altimetrico trab. campo 01 - r03 (1)
 
Asia Pacific SharePoint Capacity Planning by Joel Oleson
Asia Pacific SharePoint Capacity Planning by Joel OlesonAsia Pacific SharePoint Capacity Planning by Joel Oleson
Asia Pacific SharePoint Capacity Planning by Joel Oleson
 
Webinar: Operational Best Practices
Webinar: Operational Best PracticesWebinar: Operational Best Practices
Webinar: Operational Best Practices
 
Bi Capacity Planning
Bi Capacity PlanningBi Capacity Planning
Bi Capacity Planning
 
Capacity Planning for Cloud Computing
Capacity Planning for Cloud ComputingCapacity Planning for Cloud Computing
Capacity Planning for Cloud Computing
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
3. CPU virtualization and scheduling
3. CPU virtualization and scheduling3. CPU virtualization and scheduling
3. CPU virtualization and scheduling
 
Strategic capacity planning for products and services
Strategic capacity planning for products and servicesStrategic capacity planning for products and services
Strategic capacity planning for products and services
 
Modern Data Warehousing with the Microsoft Analytics Platform System
Modern Data Warehousing with the Microsoft Analytics Platform SystemModern Data Warehousing with the Microsoft Analytics Platform System
Modern Data Warehousing with the Microsoft Analytics Platform System
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse Architecture
 

Ähnlich wie Right-Sizing your SQL Server Virtual Machine

Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02
Suresh Kumar
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
webinar vmware v-sphere performance management Challenges and Best Practices
webinar vmware v-sphere performance management Challenges and Best Practiceswebinar vmware v-sphere performance management Challenges and Best Practices
webinar vmware v-sphere performance management Challenges and Best Practices
Metron
 
Azug - successfully breeding rabits
Azug - successfully breeding rabitsAzug - successfully breeding rabits
Azug - successfully breeding rabits
Yves Goeleven
 

Ähnlich wie Right-Sizing your SQL Server Virtual Machine (20)

VDI Design Guide
VDI Design GuideVDI Design Guide
VDI Design Guide
 
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
 
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
 
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
Vmwareperformancetroubleshooting 100224104321-phpapp02 (1)
 
Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02Vmwareperformancetroubleshooting 100224104321-phpapp02
Vmwareperformancetroubleshooting 100224104321-phpapp02
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
 
Databases love nutanix
Databases love nutanixDatabases love nutanix
Databases love nutanix
 
PlovDev 2016: Application Performance in Virtualized Environments by Todor T...
PlovDev 2016: Application Performance in Virtualized Environments by Todor T...PlovDev 2016: Application Performance in Virtualized Environments by Todor T...
PlovDev 2016: Application Performance in Virtualized Environments by Todor T...
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
 
webinar vmware v-sphere performance management Challenges and Best Practices
webinar vmware v-sphere performance management Challenges and Best Practiceswebinar vmware v-sphere performance management Challenges and Best Practices
webinar vmware v-sphere performance management Challenges and Best Practices
 
Azug - successfully breeding rabits
Azug - successfully breeding rabitsAzug - successfully breeding rabits
Azug - successfully breeding rabits
 
20160503 Amazed by AWS | Tips about Performance on AWS
20160503 Amazed by AWS | Tips about Performance on AWS20160503 Amazed by AWS | Tips about Performance on AWS
20160503 Amazed by AWS | Tips about Performance on AWS
 
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
 
(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive
 
Scalable Web Apps
Scalable Web AppsScalable Web Apps
Scalable Web Apps
 
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMsGlobal Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
 
Hyper-v Best Practices
Hyper-v Best PracticesHyper-v Best Practices
Hyper-v Best Practices
 
Virtualizing Sharepoint for Performance and Availability
Virtualizing Sharepoint for Performance and AvailabilityVirtualizing Sharepoint for Performance and Availability
Virtualizing Sharepoint for Performance and Availability
 

Kürzlich hochgeladen

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 

Kürzlich hochgeladen (20)

Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 

Right-Sizing your SQL Server Virtual Machine

  • 1. “Right-Sizing” Your SQL Server VM DBA-304David Klee, Founder Heraflux Technologies
  • 2. I want more compute resources on my SQL Server. My VM admin wants to take some away. What is the right answer? Recurring Question
  • 3. About David Klee @kleegeek davidklee.net gplus.to/kleegeek linked.com/a/davidaklee Specialties / Focus Areas / Passions: • Performance Tuning • Virtualization • Infrastructure • Troubleshooting • High Availability • Disaster Recovery • Capacity Management • Health & Efficiency
  • 5. Explore Everything PASS Has to Offer Free SQL Server and BI Web Events Free 1-day Training Events Regional Event Local User Groups Around the World Free Online Technical Training This is Community Business Analytics Training Session Recordings PASS Newsletter
  • 6. Session Evaluations ways to access Go to passsummit.com/evals Download the GuideBook App and search: PASS Summit 2014 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Submit by 11:59 PM EST Friday Nov. 7 to WIN prizes Your feedback is important and valuable. Evaluation Deadline: 11:59 PM EST, Sunday Nov. 16
  • 7. • What is “right-sizing”, and why • Profiling the system stack components • CPU / memory / storage • Analyzing environment • Workload analysis • Perfmon data review Agenda
  • 8. • Abstraction layer between hardware and OS • Resources • Queues • Limits in the environment • Resource limitations (hard) • Queue contention (soft) What Is Virtualization - for DBAs?
  • 9. • VM resource allocations • vCPU • Memory • Storage presentation • One size does not fit all workloads • Inappropriate resource allocations can hurt VM performance “Right-Sizing”?
  • 10. • Single compute node hardware • Total cluster compute capacity • Storage speed (IOPs, throughput) • VM maximums • Interconnect path speed Hard Limits (Resources) Soft Limits (Queues) • Memory oversubscription • CPU scheduler contention • Shared resource utilization • Variable resource utilization levels • “Noisy Neighbors” Hard vs. Soft Limits
  • 11. Resources 150 GHz CPU 4 TB Memory 4x10GbE Network 20 TB Tier 1 Storage 40 TB Tier 2 Storage VM 16 vCPU 128 GB vRAM VM 8 vCPU 64 GB vRAM VM 2 vCPU 16 GB vRAM VM 2 vCPU 16 GB vRAM VM 2 vCPU 16 GB vRAM VM 2 vCPU 16 GB vRAM VM 2 vCPU 16 GB vRAM VM 2 vCPU 16 GB vRAM V I R T U A L I Z A T I O N
  • 12. Queues Hypervisor CPU Scheduler CPU Execution CPU Scheduling Queue Memory Allocator Mem R / W Mem Allocation Queue Disk Scheduler Disk R / W Disk Scheduling Queue Network Scheduler Network Tran / Rec Network Scheduling Queue VM TASK VM TASK VM TASK VM TASK VM TASK
  • 13. • Resource limits are easy to detect / work around • Queue contention much harder • Time in queue = time lost from VM • Silent performance killer • Everything in a VM must be scheduled • … including idle resources • Queue processing is not always FIFO Goal: Minimize Queue Waits
  • 14. Four vCPU Scheduling VM SMPTASKS vCPU0 vCPU1 vCPU2 vCPU3 vCPU scheduling queues by pCPU core Scheduling queue waits High vCPU queue contention
  • 15. Two vCPU Scheduling VM SMPTASKS vCPU0 vCPU1 vCPU scheduling queues by pCPU core Scheduling queue waits High vCPU queue contention
  • 16. • 24x7 performance metric collection • CRITICAL • Metrics from every piece of the system stack Performance Metric Collection Networking Interconnects Physical Server Virtualization Operating System SQL Server Instance SQL Server DB Application Storage
  • 17. • SQL Server • Raw CPU / mem / disk usage • NUMA memory usage • Signal waits • Storage latency by DB file • Wait statistics • Glenn Berry @ bit.ly/1wdMB8n Which High Level Metrics? • Windows • CPU & memory consumption • Storage IOPs / latency / throughput • Processes (SQL Server vs other) • Perfmon how-to @ bit.ly/1sqSVns • @ bit.ly/1xW4jzJ Capture all metrics as granularly as possible!
  • 18. • Virtualization • Resource consumption by VM • Resource utilization by host • CPU scheduling queue wait • Overcommitment metrics • VMware vSphere: CPU Ready • MS Hyper-V: CPU Wait Time per Dispatch Which High Level Metrics? • Storage • IOPs / latency / throughput • By LUN • By disk group • Controller • Interconnect path utilization • Controller cache hit metrics Capture all metrics as granularly as possible!
  • 19. • Overlay all data streams • Understand / classify: • Workload periods • Workload sources • Business time period • Goal: metrics by time period How to Analyze • Median & Percentile analysis • Explain & filter statistical anomalies • Statistics • Min / Average / Max / Median • Percentile
  • 20. How to Size vCPUs
  • 21. • vCPU counts matter! • Size for what you need today • Too many vCPUs = BAD (probably) • Too few vCPUs = BAD (usually) • Workload / server specific vCPU Sizing
  • 22. • Not done at just vCPU count • vNUMA configuration also matters • Closely align with pNUMA • Adds efficiency by aligning with underlying hardware • Performance difference improves with larger VMs CPU Sizing - NUMA
  • 23. • Get physical machine configuration • Try to fit VM inside one NUMA node • Otherwise, balance across number of NUMA nodes • Test configurations for best results CPU Sizing - vNUMA
  • 24. • Example: 16 vCPU VM • What’s better? • 2 vSocket x 8 vCore? • 4 vSocket x 4 vCore? • 8 vSocket x 2 vCore? • Varies by workload, hardware • Test it for yourself! CPU Sizing – vNUMA Results 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 8 16 64 256 Transactions/min Concurrent HammerDB Users vNUMA SQL Server Scalability - 16 vCPUs - HammerDB 4socket x 4CPU 8socket x 2CPU 2socket x 8CPU
  • 25. • SQL Server • CPU consumption by DB • Top waits • Signal waits • Scrape parallelism from execution plan @ bit.ly/1rTs9UX CPU - Metrics • Windows • CPU usage per core • SQL Server vs. background • VM Host • CPU utilization over 80% • VM CPU queue waits high
  • 26. • Understand the workload parallelism, concurrent volume • Determine averages, maximums, and percentiles • Determine the appropriate profiling period • < 40% utilization avg – too many CPUs • > 60% utilization avg – too few CPUs • Factor CPU waits inside SQL Server • Vary according to your circumstances How To Size vCPUs
  • 27. How To Size vRAM
  • 28. • SQL Server data must be in buffer pool • More memory ≈ less I/O • Less I/O = less waiting on shared storage & queues • NO HOST MEMORY OVERCOMMITMENT • Too much memory = lower VM consolidation ratio • Balancing act Memory
  • 29. • SQL Server • Page Life Expectancy • Buffer Cache Hit Ratio • High page fault count • High recompile ratio • RESOURCE_SEMAPHORE waits • Memory grants pending Memory - Metrics • Windows • MB free • Paging • VM Host • Memory consumption > 90% • Memory ballooning / dynamic memory expansion
  • 30. • How much memory? • Slow storage? More RAM! • Fast storage? Less RAM? • More RAM = less host-level consolidation • More SQL Server licensing (possibly) • Table / index compression How To Size vRAM
  • 32. • Much less variable in nature • Most shared resource • Most critical • Most complex • Most problematic • Slowest piece of the stack • Random I/O disk patterns • Many individual points of contention Storage
  • 33. Storage – Contention Points Controller Controller LUN LUN LUN LUN Disk Pool VM VM VM VM
  • 34. • Test raw performance • SQLIO Batch bit.ly/1mEAS9W • DiskSpd bit.ly/1CeQauw • Collect metrics: • I/Os per second (IOPs) • Latency (ms) • Throughput (MB/s) Storage - Maximums 0.00 10000.00 20000.00 30000.00 40000.00 50000.00 60000.00 70000.00 1 2 4 8 16 32 64 128 IOps Thread Intensity IOps Per Operations per Thread Sequential Read Random Read Sequential Write Random Write
  • 35. Storage – Spread Out Workload SAN DB E: FG1 FG2 DF4 DF3 DF2 DF1 G: F: WindowsServerOSx Virtualization Hardware HBA4HBA3HBA2HBA1 InterconnectSwitch Controller1Controller2 SANDiskGroup LUN2LUN1 HBA4HBA3HBA2HBA1
  • 37. • Determine your runtime stats & percentiles • Determine load thresholds • Review estimated requirements • Change VM configuration • Incremental changes, not huge ones • Test and retest Collected Metrics - Now What?
  • 39. • Workloads & applications change • DBs are added / removed • Perform a right-sizing analysis as necessary • Adjust the VM resources accordingly • Recommended: Periodic review of VM sizing • Quarterly for volatile environments Not a One-Time Process
  • 40. • One VM size does not fit all workloads • Profile and record your workload performance characteristics • Analyze the numbers • Adjust VM configuration and validate • Repeat as often as your workload changes Summary
  • 41. This is a pain! Shouldn’t this be easier? But Wait!
  • 43. • Automate the estimation of a VM’s “right-sized” resource assignment •FREE! • Beta to be available soon! SQL Server VM “Right Size” Estimator

Hinweis der Redaktion

  1. Switch to analysis spreadsheet
  2. Switch to spreadsheet
  3. Switch to spreadsheet
  4. SQLIO Batch
  5. Go to advanced analysis spreadsheet
  6. Show system stack diagram
  7. Go to advanced analysis spreadsheet