SlideShare a Scribd company logo
Virtual SQL Servers. Actual Performance.
© Heraflux Technologies® 2
@kleegeek
davidklee.net
heraflux.com
linkedin.com/in/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning & Troubleshooting
• Virtualization
• Cloud Enablement
• Infrastructure Architecture
• Health & Efficiency
• Capacity Management Founder & Chief Architect
 What is Virtualization?
 Resources and queues
 Physical servers
 Storage and interconnects
 VM architecture
 Inside the VM
© Heraflux Technologies® 3
 Added layer
 Physical resources
 Resource queues
 Very small queue delays
 When done right…
 Shared everything architecture
© Heraflux Technologies® 4
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
© Heraflux Technologies® 5
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
© Heraflux Technologies® 6
• Finite!
• Single compute node hardware
• Total cluster compute capacity
• Storage speed (IOPs, throughput)
• VM maximums
• Interconnect path speed
Hard Limits (Resources) Soft Limits (Queues)
• Measurable but not finite
• Memory oversubscription
• CPU scheduler contention
• Shared resource utilization
• “Noisy Neighbors”
© Heraflux Technologies® 7• 7
• 7
© Heraflux Technologies® 8
Networking
Interconnects
Storage
Physical Server
Virtualization
Operating System
SQL Server Instance
SQL Server DB
Application
© Heraflux Technologies® 9
 Most shared
 Most critical
 Most complex
 Most problematic
 Slowest piece of the stack
 Many individual points of contention
© Heraflux Technologies® 10
© Heraflux Technologies® 11
Controller
Controller
LUN
LUN
LUN
LUN
Disk Pool
T1
T2
T3
 Test raw performance
 SQLIO
Deprecated!
 DiskSpd Batch
heraflux.com/go/diskspd
 Collect metrics:
 I/Os per second (IOPs)
 Latency (ms)
 Throughput (MB/s) 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
© Heraflux Technologies® 12
© Heraflux Technologies® 13
14
(Img src: http://www.asacomputers.com/2U-Server-Sandy-Bridge.html)
 Manufacturer
 Intel
 AMD
 Sockets
 Cores
 Speed vs. GHz
 Logical vs. Physical
 Hyperthreading
© Heraflux Technologies® 15
© Heraflux Technologies® 16
(Img src: http://frankdenneman.nl/2011/01/05/amd-magny-cours-and-esx/)
CPU CPU CPU CPU
Memory
© Heraflux Technologies® 17
(Img src: http://www.learnyourtech.com/hardware/)
 Sample Cisco UCS
memory config
 Slot & chip
placement
© Heraflux Technologies® 18
(Src: http://www.cisco.com/c/dam/en/us/products/collateral/servers-unified-computing/ucs-b-series-blade-servers/b200m4-specsheet.pdf page 44)
© Heraflux Technologies® 19
 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
© Heraflux Technologies® 20
 Get physical machine configuration
 Try to fit VM inside one NUMA node
 Otherwise, balance across number
of NUMA nodes
 Test configurations for
best results
© Heraflux Technologies® 21
 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!
© Heraflux Technologies® 22
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
 1 vCPU to 1 pCPU is
a poor recommendation
 Queues
 Ready Time
 Co-Stop
 Ex: Client environment
 74 running VMs
 VMs @ 2-8 vCPU
 72 total pCores
 Fantastic performance
© Heraflux Technologies® 23
© Heraflux Technologies® 24
© Heraflux Technologies® 25
© Heraflux Technologies® 26
 “Right” amount of vCPU and vRAM resources
 Physical world = Size for end of life
 Virtual world = Size for right now
 Idle vCPUs will slow application VMs performance
 Repeat “right-sizing” analysis routinely
© Heraflux Technologies® 27
 Virtual disks whenever possible
 Multiple SCSI controllers
 VMware – PVSCSI
 Spread out the workload
© Heraflux Technologies® 28
 C: - Operating System
 D: - SQL Server Instance Home
 E: - System Databases (master, model, msdb) *
 F: - User Database Data (1 of X)…
 G: - User Database Log (1 of Y)…
 H: - TempDB…
 Y: - Windows Page file **
 Z: - Backups Adjust as necessary
(but stay standardized)
© Heraflux Technologies® 29
 64KB NTFS block sizes
 Set power settings to “High Performance” (CPU-Z)
 Set antivirus exclusions for SQL Server (tinyurl.com/sqlav)
 Ongoing OS-level performance metric collection
 No greater than five minute interval
 Windows Perfmon, Microsoft SCOM,
or other third-party utility
 heraflux.com/go/perfmon
© Heraflux Technologies® 30
 Goal: Maximize performance while reducing resource scheduling
 Parallelizable workloads
 Determine how parallel the workload is
 Set MaxDOP = vNUMA node core count (?)
 Cost threshold for parallelism = Not default
 Jonathan Kehayias – Tuning CTOP from Plan Cache
 bit.ly/1rTs9UX
© Heraflux Technologies® 31
 Spread out the I/O
 File groups, data files, partitions
 Parallelism with multiple active storage paths
 Reduce I/O
 Table / index compression vs. SAN compression
 In-memory constructs
 More RAM
 SSD read / write caching
 Faster I/O – All flash SAN
 And then clean up bad schemas & queries!
© Heraflux Technologies® 32
 Virtualization works.
 Equivalent performance if done right
 Efficiency in data handling
© Heraflux Technologies® 33
© Heraflux Technologies® 34
@kleegeek
davidklee.net
heraflux.com
linkedin.com/in/davidaklee
Virtual SQL Servers. Actual Performance.

More Related Content

PDF
Unified Hardware Abstraction Layer with Device Masquerade
PDF
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
PDF
VM-aware Adaptive Storage Cache Prefetching
PDF
Presentazione PernixData @ VMUGIT UserCon 2015
PDF
PernixData - A New Era of Server Side Storage
PPTX
Charleston SC VMUG 8/14/13
PPTX
How to Fail at VDI
PDF
XPDDS18: Performance tuning on Xen platform - Bo Zhang & Yifei Jiang, Huawei
Unified Hardware Abstraction Layer with Device Masquerade
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
VM-aware Adaptive Storage Cache Prefetching
Presentazione PernixData @ VMUGIT UserCon 2015
PernixData - A New Era of Server Side Storage
Charleston SC VMUG 8/14/13
How to Fail at VDI
XPDDS18: Performance tuning on Xen platform - Bo Zhang & Yifei Jiang, Huawei

What's hot (20)

PPTX
RanjiSample
PPTX
Ceph Day KL - Ceph Tiering with High Performance Archiecture
PDF
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
PDF
Enabling POWER 8 advanced features on Linux
PDF
XPDDS18: The Art of Virtualizing Cache Maintenance - Julien Grall, Arm
PDF
XPDDS18: Memory Overcommitment in XEN - Huang Zhichao, Huawei
ODP
Performance: Observe and Tune
PPTX
TDS-16489U-R2 0215 EN
PDF
Keith Paskett - Postgres on ZFS @ Postgres Open
PPT
Ibm aix technical deep dive workshop advanced administration and problem dete...
PDF
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
PDF
XPDDS17: Xen-lite for ARM: Adapting Xen for a Samsung Exynos MicroServer with...
PDF
제3회난공불락 오픈소스 인프라세미나 - lustre
PDF
XPDDS17: How to Abstract Hardware Acceleration Device in Cloud Environment - ...
PPTX
Design decision nfs-versus_fc_storage v_0.3
PDF
Relax and Recover on POWER (Updated 05-2017)
PDF
KVM Tuning @ eBay
PDF
IMCSummit 2015 - Day 2 Developer Track - The NVM Revolution
PDF
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
PDF
XPDS13: Perf Support in Xen - Boris Ostrovsky, Oracle
RanjiSample
Ceph Day KL - Ceph Tiering with High Performance Archiecture
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
Enabling POWER 8 advanced features on Linux
XPDDS18: The Art of Virtualizing Cache Maintenance - Julien Grall, Arm
XPDDS18: Memory Overcommitment in XEN - Huang Zhichao, Huawei
Performance: Observe and Tune
TDS-16489U-R2 0215 EN
Keith Paskett - Postgres on ZFS @ Postgres Open
Ibm aix technical deep dive workshop advanced administration and problem dete...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDDS17: Xen-lite for ARM: Adapting Xen for a Samsung Exynos MicroServer with...
제3회난공불락 오픈소스 인프라세미나 - lustre
XPDDS17: How to Abstract Hardware Acceleration Device in Cloud Environment - ...
Design decision nfs-versus_fc_storage v_0.3
Relax and Recover on POWER (Updated 05-2017)
KVM Tuning @ eBay
IMCSummit 2015 - Day 2 Developer Track - The NVM Revolution
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDS13: Perf Support in Xen - Boris Ostrovsky, Oracle
Ad

Similar to Virtual SQL Servers. Actual Performance. (20)

PPTX
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
PPTX
Master VMware Performance and Capacity Management
PPT
Good virtual machines
PDF
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
PPTX
VDI Design Guide
PPT
WinConnections Spring, 2011 - 30 Bite-Sized Tips for Best vSphere and Hyper-V...
PPTX
Simplifying Hyper-V Management for VMware Administrators
PPTX
Varrow madness 2013 virtualizing sql presentation
PPTX
Hyper-v Best Practices
PPTX
Objective SQL Server Performance
PPT
prezentációt
PPT
z/VM Performance Analysis
PPTX
Get Your GeekOn with Ron - Session One: Designing your VDI Servers
PDF
Session 7362 Handout 427 0
PPT
ESX performance problems 10 steps
PDF
Hyper-V Best Practices & Tips and Tricks
PDF
VMworld 2013: Building a Validation Factory for VMware Partners
PPTX
VMworld 2015: The “Snappy” Virtual Desktop User Experience
PDF
VMware End-User-Computing Best Practices Poster
PPS
Microsoft (Virtualization 2008)
24 Hours of PASS, Summit Preview Session: Virtual SQL Server CPUs
Master VMware Performance and Capacity Management
Good virtual machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VDI Design Guide
WinConnections Spring, 2011 - 30 Bite-Sized Tips for Best vSphere and Hyper-V...
Simplifying Hyper-V Management for VMware Administrators
Varrow madness 2013 virtualizing sql presentation
Hyper-v Best Practices
Objective SQL Server Performance
prezentációt
z/VM Performance Analysis
Get Your GeekOn with Ron - Session One: Designing your VDI Servers
Session 7362 Handout 427 0
ESX performance problems 10 steps
Hyper-V Best Practices & Tips and Tricks
VMworld 2013: Building a Validation Factory for VMware Partners
VMworld 2015: The “Snappy” Virtual Desktop User Experience
VMware End-User-Computing Best Practices Poster
Microsoft (Virtualization 2008)
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
Understanding_Digital_Forensics_Presentation.pptx

Virtual SQL Servers. Actual Performance.

  • 2. © Heraflux Technologies® 2 @kleegeek davidklee.net heraflux.com linkedin.com/in/davidaklee Specialties / Focus Areas / Passions: • Performance Tuning & Troubleshooting • Virtualization • Cloud Enablement • Infrastructure Architecture • Health & Efficiency • Capacity Management Founder & Chief Architect
  • 3.  What is Virtualization?  Resources and queues  Physical servers  Storage and interconnects  VM architecture  Inside the VM © Heraflux Technologies® 3
  • 4.  Added layer  Physical resources  Resource queues  Very small queue delays  When done right…  Shared everything architecture © Heraflux Technologies® 4
  • 5. 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 © Heraflux Technologies® 5
  • 6. 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 © Heraflux Technologies® 6
  • 7. • Finite! • Single compute node hardware • Total cluster compute capacity • Storage speed (IOPs, throughput) • VM maximums • Interconnect path speed Hard Limits (Resources) Soft Limits (Queues) • Measurable but not finite • Memory oversubscription • CPU scheduler contention • Shared resource utilization • “Noisy Neighbors” © Heraflux Technologies® 7• 7 • 7
  • 8. © Heraflux Technologies® 8 Networking Interconnects Storage Physical Server Virtualization Operating System SQL Server Instance SQL Server DB Application
  • 10.  Most shared  Most critical  Most complex  Most problematic  Slowest piece of the stack  Many individual points of contention © Heraflux Technologies® 10
  • 11. © Heraflux Technologies® 11 Controller Controller LUN LUN LUN LUN Disk Pool T1 T2 T3
  • 12.  Test raw performance  SQLIO Deprecated!  DiskSpd Batch heraflux.com/go/diskspd  Collect metrics:  I/Os per second (IOPs)  Latency (ms)  Throughput (MB/s) 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 © Heraflux Technologies® 12
  • 15.  Manufacturer  Intel  AMD  Sockets  Cores  Speed vs. GHz  Logical vs. Physical  Hyperthreading © Heraflux Technologies® 15
  • 16. © Heraflux Technologies® 16 (Img src: http://frankdenneman.nl/2011/01/05/amd-magny-cours-and-esx/) CPU CPU CPU CPU Memory
  • 17. © Heraflux Technologies® 17 (Img src: http://www.learnyourtech.com/hardware/)
  • 18.  Sample Cisco UCS memory config  Slot & chip placement © Heraflux Technologies® 18 (Src: http://www.cisco.com/c/dam/en/us/products/collateral/servers-unified-computing/ucs-b-series-blade-servers/b200m4-specsheet.pdf page 44)
  • 20.  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 © Heraflux Technologies® 20
  • 21.  Get physical machine configuration  Try to fit VM inside one NUMA node  Otherwise, balance across number of NUMA nodes  Test configurations for best results © Heraflux Technologies® 21
  • 22.  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! © Heraflux Technologies® 22 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
  • 23.  1 vCPU to 1 pCPU is a poor recommendation  Queues  Ready Time  Co-Stop  Ex: Client environment  74 running VMs  VMs @ 2-8 vCPU  72 total pCores  Fantastic performance © Heraflux Technologies® 23
  • 27.  “Right” amount of vCPU and vRAM resources  Physical world = Size for end of life  Virtual world = Size for right now  Idle vCPUs will slow application VMs performance  Repeat “right-sizing” analysis routinely © Heraflux Technologies® 27
  • 28.  Virtual disks whenever possible  Multiple SCSI controllers  VMware – PVSCSI  Spread out the workload © Heraflux Technologies® 28
  • 29.  C: - Operating System  D: - SQL Server Instance Home  E: - System Databases (master, model, msdb) *  F: - User Database Data (1 of X)…  G: - User Database Log (1 of Y)…  H: - TempDB…  Y: - Windows Page file **  Z: - Backups Adjust as necessary (but stay standardized) © Heraflux Technologies® 29
  • 30.  64KB NTFS block sizes  Set power settings to “High Performance” (CPU-Z)  Set antivirus exclusions for SQL Server (tinyurl.com/sqlav)  Ongoing OS-level performance metric collection  No greater than five minute interval  Windows Perfmon, Microsoft SCOM, or other third-party utility  heraflux.com/go/perfmon © Heraflux Technologies® 30
  • 31.  Goal: Maximize performance while reducing resource scheduling  Parallelizable workloads  Determine how parallel the workload is  Set MaxDOP = vNUMA node core count (?)  Cost threshold for parallelism = Not default  Jonathan Kehayias – Tuning CTOP from Plan Cache  bit.ly/1rTs9UX © Heraflux Technologies® 31
  • 32.  Spread out the I/O  File groups, data files, partitions  Parallelism with multiple active storage paths  Reduce I/O  Table / index compression vs. SAN compression  In-memory constructs  More RAM  SSD read / write caching  Faster I/O – All flash SAN  And then clean up bad schemas & queries! © Heraflux Technologies® 32
  • 33.  Virtualization works.  Equivalent performance if done right  Efficiency in data handling © Heraflux Technologies® 33
  • 34. © Heraflux Technologies® 34 @kleegeek davidklee.net heraflux.com linkedin.com/in/davidaklee

Editor's Notes

  • #2: Start with the coffee cup / vnx fiber issue story
  • #13: SQLIO Batch