SlideShare a Scribd company logo
IO, IO! Why’s my SQL slow?
Brian Flynn
Product Manager
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Define Speed?
» Acceleration
» Burst/Top Speed
» Sustained Speed
» Constraints
» Total Trip Time
» Average Speed
2
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
» Imagine transporting things a long distance.
» Just you and an over night bag vs everything you own…
3
Latency, Speed, & Throughput
High Acceleration (Low Latency) Medium Acceleration (Medium Latency) Low Acceleration (High Latency)
High Top Speed Medium Top Speed Low Top Speed
Small Cargo Medium Cargo Large Cargo
Low Capacity Medium Capacity High Capacity
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Latency, Speed, & Throughput
» Electricity:
 Volts / Ohms = Amps
 Volts * Amps = Watts
» Data:
 Buffer Size / Latency = Transfer Rate
 Buffer Size * Transfer Rate = Throughput
4
Analogy Size Current Resistance Capacity
Electricity Volts Amps Ohms Watts
Water Pressure Flow Rate Inverse of channel
diameter
Volume/Time
Data Buffer Size
* compression
* jumbo frames
Transfer Rate
*IOPS
Latency
* Function of Distance
* Function of storage type
Throughput
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Latency, Speed, & Throughput
» When speed is
constant, packet size
governs throughput.
» Larger packets increase
throughput.
» Greater distance
increases latency which
lowers perceived
throughput.
5
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
True speed is all about latency
» 1 byte or 1000 bytes,
same trip time.
» Overhead accounts
for more constraint
than sum of the
serialized trips.
6
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Aren’t we talking about storage?
» HDD latency
 Rotating the platter
 Moving the head
» SSD latency
 One controller is a gateway for multiple chips
» RAID latency
 Mirror – Improves read IOPS if split reads is supported.
 Stripe – Improves read & write IOPS.
 Distributed Parity – Write IOPS penalty for calculating parity bits.
 Raid 10 – Mirror & Stripe. No write penalty. Twice the price of stripe only.
» SAN latency
 One controller is the gateway to many disks.
 Limited bandwidth to arrays
» NAS latency
 Network is usually the weakest link
7
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Enough already, just make it faster!
» There’s more than straight line acceleration.
» Complex systems force us to tease out the latency bottlenecks
» Balancing 3 Options
1. Get the same work done with fewer operations
2. Do more in parallel
3. Make individual operations faster
8
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Get the same work done with fewer operations
» In our transportation example, same work with fewer trips
… The big semi does this… larger cargo or payload.
» With data, however…
 Eliminate redundant or superfluous database work
• Create indexes that reduce table scans
• Keep tables defragmented to increase read-ahead
• Keep frequently used data in application memory
 Caching techniques to reduce re-reading from storage
• SAN cache
• Server memory
• SQL 2014 Buffer Pool Extension
 Compress data
• More pages in memory increases page life expectancy
• Compressed data will fit into fewer Physical I/Os
• ** CPU latency must be lower than storage latency
9
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Do more in parallel
» Adding disks to an array increases maximum IOPS
 Helps where I/O can be parallelized
• Multiple CPU issuing synchronous I/Os
• SQL Server Pre-fetch & Read-ahead
• Reference: MSDN: Sequential Read Ahead
» Defragmentation increases Read-ahead, which is asynchronous
» Evaluate for parallel capabilities end to end
 Multiple file groups on isolated storage
 Multiple, isolated LUNs
 Multiple OS disk queues
 Consider SAN paths & controllers
» Bottom line, you can’t parallelize everything
 Business Analogy: The Mythical Man Month
 Humorous Analogy: The Pregnancy Problem
10
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Make individual operations faster
» Almost always, a winner! But often, the most expensive solution.
» Lower latency storage
 HDD Moving parts  Mechanical latency
 Random reads  More mechanical latency
 Thus to optimize, maximize sequential reads before random reads
 Of course, with RAID arrays, almost every read is random
 SSDs have no moving parts  No mechanical latency
 Thus all reads are equal. No benefit to sequential vs random
» Who’s IO are we talking about?
 Typical disk I/Os are usually 4K
 SQL Server I/Os range from 8K to 512K
» REF: http://www.confio.com/logicalread/fragmentation-reorganization-rebuilds-sql-server-table-scans-bf01/#.U1aJKvldU9I
11
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
How Do I Choose? It depends… :-
» It depends… At best, all three. Next best, any combination.
 3rd party software may not permit your query tuning
 Budget constraints may not permit low latency storage
 The size of I/Os may not lend to parallelizing workloads
» General rules:
 Reducing total # I/Os is always a winner.
 For large result sets or concurrency  Increasing IOPS can help a lot
 For small result sets  Raw speed (Latency) may be your only hope.
12
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Disk Queue Depth
» I hate queues, especially at the DMV! Waiting in line stinks!
» Disk Queue Length is a measure of I/O constraint.
» How high is OK? It depends on your environment.
 Different performance expectation between OLTP and OLAP systems
» If it’s consistently high, adding disks to the array may help.
» You should be watching this one and DPA does that…
13
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Other WMI Counters
» Latency-Like
 Avg. Disk Sec/Read is the average time, in seconds, of a read of data
from the disk.
 Avg. Disk Sec/Write is the average time, in seconds, of a write of data
to the disk.
» Current-Like
 Avg. Disk Reads/Sec is the rate of read operations on the disk.
 Avg. Disk Writes/Sec is the rate of write operations on the disk.
» Physical Disk: %Disk Time is the percentage of elapsed time
that the selected disk drive was busy servicing read or write
requests.
REF: http://blogs.msdn.com/b/dpless/archive/2010/12/01/leveraging-sys-dm-io-virtual-file-stats.aspx?Redirected=true
14
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Virtual File Stats DMO
15
http://technet.microsoft.com/en-us/library/ms190326.aspx
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Crystal Disk Mark
» A great, free tool that tells you the throughput of your
storage under a few mixtures of I/O size, queue depth
and sequential or random I/O. You may not get your
storage admin’s blessing to run this.  But it’s a decent
way to measure throughput.
16
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
SQLIO
17
REF: http://www.brentozar.com/archive/2008/09/finding-your-san-bottlenecks-with-sqlio/
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
18
Query Plans & Process Monitor
» Query plans tell you when you’re scanning and seeking
» ProcMon tells you how many and how big are the storage I/Os
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Server memory, SAN Cache, Tierd Storage etc
» You’ll have to clear a few obstacles.
» SQL Server caches pages in RAM so when
testing you’ll need dump the buffer cache to
ensure you are going to disk.
» And unless your storage admin is a gift from
the DBA gods, you’ll have to get real creative
to control for SAN cache in any experiments.
» Tiered storage can cause unpredictability too.
19
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Free Tools for SAN & VM environments
20
http://www.solarwinds.com/products/freetools/san_monitor/
http://www.solarwinds.com/products/freetools/storage-response-time-monitor.aspx
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Design Choices : Fragmentation Impacts
» Design for Read Ahead
 Understand & avoid physical and logical fragmentation
 Clustered indexes that monotonously increment on isolated storage
 Pre-allocate files in larger swatches rather than auto-grow
» Use file groups and different storage based on I/O demand
 Rarely accessed things on less performant media
 Frequently accessed things on highly performant media
» Plan ahead!
21
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
DMV Wait Types
» Multiple wait types indicate storage I/O
» DPA breaks down query execution by wait type over time.
 http://database.demo.solarwinds.com/
22
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
DEMONSTRATION TIME!
23
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Think you have Database I/O issues?
» DPA can identify and recommend action on I/O issues.
» Check out the new Storage I/O feature in DPA 9.0!
24
http://www.solarwinds.com/resources/videos/utilize-dpa-storage-io-to-find-performance-issues.html
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Quickly resolve Oracle performance issues
» Try Database Performance Analyzer FREE for 14 days
» Improve root cause of slow performance
 Identify issues that impact end-user response time
 Isolates root cause in just four clicks
 See historical trends over days, months, and years
 Understand impact of VMware® performance
 Agentless architecture with no dependence on Oracle Packs, installs in
minutes
www.solarwinds.com/dpa-download/
Thank you!
» Brian Flynn
» brian.flynn@solarwinds.com
» Twitter : @brianpaulflynn
» LinkedIn: brianpaulflynn
26
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Questions?
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Thank You!
The SOLARWINDS and SOLARWINDS & Design marks are the exclusive
property of SolarWinds Worldwide, LLC, are registered with the U.S.
Patent and Trademark Office, and may be registered or pending
registration in other countries. All other SolarWinds trademarks, service
marks, and logos may be common law marks, registered or pending
registration in the United States or in other countries. All other
trademarks mentioned herein are used for identification purposes only
and may be or are trademarks or registered trademarks of their respective
companies.

More Related Content

PDF
Sambutan bupati wonosobo acara raker pac gp ansor
PPTX
User story mapping
PDF
01 mei 2021, sambutan bupati wonosobo may day
PDF
Sambutan bupati wonosobo gerakan literasi digital
PDF
Why new hardware may not make SQL Server faster
PPTX
The Fiction behind IT Security Confidence
PPTX
Survey: IT is Everywhere (End Users’ Perspective, UK)
PDF
Easy way to do rolling upgrades for SQL Server
Sambutan bupati wonosobo acara raker pac gp ansor
User story mapping
01 mei 2021, sambutan bupati wonosobo may day
Sambutan bupati wonosobo gerakan literasi digital
Why new hardware may not make SQL Server faster
The Fiction behind IT Security Confidence
Survey: IT is Everywhere (End Users’ Perspective, UK)
Easy way to do rolling upgrades for SQL Server

Viewers also liked (20)

PPTX
SolarWinds Federal Webinar: Technical Update & Demo of New Features
PDF
The have no fear guide to virtualizing databases
PDF
Advanced tips for making Oracle databases faster
PPTX
Ending the Tyranny of Expensive Security Tools
PPTX
Survey: IT is Everywhere (End Users’ Perspective, Hong Kong)
PPTX
SolarWinds Federal User Group 2016 - SolarWinds Network Management Products U...
PPTX
Air Force Webinar: Using a SIEM to Improve Your IT Security
PPTX
Federal Tools Webinar: Leveraging Affordable Tools to Enhance Your Orion Impl...
PPTX
Survey: IT is Everywhere (End Users’ Perspective, Singapore)
PPTX
National Government Webinar: Reap the Rewards of IT Consolidation
PPTX
Get High-Octane Virtual Datacenter Performance
PPTX
SolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
PPTX
SolarWinds Federal Tools Webinar - Using Integrated Tools to Improve Federal ...
PPTX
SAM Webinar - Keep Your Web Apps Running Lean & Mean
PPTX
SolarWinds Application Performance End User Survey (Public Sector Results)
PDF
Why SQL Server 2014 Cardinality Estimator is *the* killer feature
PPTX
Survey: IT is Everywhere (End Users’ Perspective, Australia)
PPTX
Survey: IT is Everywhere (End Users’ Perspective, Brazil)
PPTX
SolarWinds federal User Group 2016 - SolarWinds Systems Management, Database ...
PPTX
Federal Webinar: Security Compliance with SolarWinds Network Management Tools
SolarWinds Federal Webinar: Technical Update & Demo of New Features
The have no fear guide to virtualizing databases
Advanced tips for making Oracle databases faster
Ending the Tyranny of Expensive Security Tools
Survey: IT is Everywhere (End Users’ Perspective, Hong Kong)
SolarWinds Federal User Group 2016 - SolarWinds Network Management Products U...
Air Force Webinar: Using a SIEM to Improve Your IT Security
Federal Tools Webinar: Leveraging Affordable Tools to Enhance Your Orion Impl...
Survey: IT is Everywhere (End Users’ Perspective, Singapore)
National Government Webinar: Reap the Rewards of IT Consolidation
Get High-Octane Virtual Datacenter Performance
SolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
SolarWinds Federal Tools Webinar - Using Integrated Tools to Improve Federal ...
SAM Webinar - Keep Your Web Apps Running Lean & Mean
SolarWinds Application Performance End User Survey (Public Sector Results)
Why SQL Server 2014 Cardinality Estimator is *the* killer feature
Survey: IT is Everywhere (End Users’ Perspective, Australia)
Survey: IT is Everywhere (End Users’ Perspective, Brazil)
SolarWinds federal User Group 2016 - SolarWinds Systems Management, Database ...
Federal Webinar: Security Compliance with SolarWinds Network Management Tools
Ad

Similar to How to fix IO problems for faster SQL Server performance (20)

PDF
How to deploy SQL Server on an Microsoft Azure virtual machines
PPTX
How Do I Know My SQL & Virtual Environments Are Ready for SSD?
PDF
Find and fix SQL Server performance problems faster
PDF
How to configure SQL Server for SSDs and VMs
PDF
Is This Really a SAN Problem? Understanding the Performance of Your IO Subsy...
PDF
Why does my choice of storage matter with cassandra?
PPTX
Trouble shooting Storage Area Networks for virtualisation deployments
ODP
MNPHP Scalable Architecture 101 - Feb 3 2011
DOC
Using preferred read groups in oracle asm michael ault
PPTX
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
PPTX
Next Generation Software-Defined Storage
PDF
Introduction to Distributed Computing & Distributed Databases
PDF
The Fundamental Characteristics of Storage concepts for DBAs
PPT
Stopping Storage Hardware Sprawl
PPT
Cohodatawebinar
PPTX
San presentation nov 2012 central pa
PPTX
Towards User-Defined SLA in Cloud Flash Storage.pptx
PDF
BigData as a Platform: Cassandra and Current Trends
PPS
Web20expo Scalable Web Arch
PPS
Web20expo Scalable Web Arch
How to deploy SQL Server on an Microsoft Azure virtual machines
How Do I Know My SQL & Virtual Environments Are Ready for SSD?
Find and fix SQL Server performance problems faster
How to configure SQL Server for SSDs and VMs
Is This Really a SAN Problem? Understanding the Performance of Your IO Subsy...
Why does my choice of storage matter with cassandra?
Trouble shooting Storage Area Networks for virtualisation deployments
MNPHP Scalable Architecture 101 - Feb 3 2011
Using preferred read groups in oracle asm michael ault
Building Data Pipelines with SMACK: Designing Storage Strategies for Scale an...
Next Generation Software-Defined Storage
Introduction to Distributed Computing & Distributed Databases
The Fundamental Characteristics of Storage concepts for DBAs
Stopping Storage Hardware Sprawl
Cohodatawebinar
San presentation nov 2012 central pa
Towards User-Defined SLA in Cloud Flash Storage.pptx
BigData as a Platform: Cassandra and Current Trends
Web20expo Scalable Web Arch
Web20expo Scalable Web Arch
Ad

More from SolarWinds (20)

PPTX
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
PPTX
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
PPTX
Government Webinar: Alerting and Reporting in the Age of Observability
PPTX
Government and Education Webinar: Full Stack Observability
PPTX
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
PPTX
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
PPTX
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
PPTX
Government and Education Webinar: Simplify Your Database Performance Manageme...
PPTX
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
PPTX
Government and Education Webinar: Leverage Automation to Improve IT Operations
PPTX
Government and Education Webinar: Improving Application Performance
PPTX
Government and Education: IT Tools to Support Your Hybrid Workforce
PPTX
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
PPTX
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
PPTX
Government and Education Webinar: Zero-Trust Panel Discussion
PPTX
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
PPTX
Government and Education Webinar: SQL Server—Advanced Performance Tuning
PPTX
Government and Education Webinar: Recovering IP Addresses on Your Network
PPTX
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
PPTX
Government and Education Webinar: Conquering Remote Work IT Challenges
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
Government Webinar: Alerting and Reporting in the Age of Observability
Government and Education Webinar: Full Stack Observability
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
Government and Education Webinar: Leverage Automation to Improve IT Operations
Government and Education Webinar: Improving Application Performance
Government and Education: IT Tools to Support Your Hybrid Workforce
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
Government and Education Webinar: Zero-Trust Panel Discussion
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
Government and Education Webinar: SQL Server—Advanced Performance Tuning
Government and Education Webinar: Recovering IP Addresses on Your Network
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
Government and Education Webinar: Conquering Remote Work IT Challenges

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Understanding_Digital_Forensics_Presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology
Unlocking AI with Model Context Protocol (MCP)
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding

How to fix IO problems for faster SQL Server performance

  • 1. IO, IO! Why’s my SQL slow? Brian Flynn Product Manager © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 2. Define Speed? » Acceleration » Burst/Top Speed » Sustained Speed » Constraints » Total Trip Time » Average Speed 2 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 3. » Imagine transporting things a long distance. » Just you and an over night bag vs everything you own… 3 Latency, Speed, & Throughput High Acceleration (Low Latency) Medium Acceleration (Medium Latency) Low Acceleration (High Latency) High Top Speed Medium Top Speed Low Top Speed Small Cargo Medium Cargo Large Cargo Low Capacity Medium Capacity High Capacity © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 4. Latency, Speed, & Throughput » Electricity:  Volts / Ohms = Amps  Volts * Amps = Watts » Data:  Buffer Size / Latency = Transfer Rate  Buffer Size * Transfer Rate = Throughput 4 Analogy Size Current Resistance Capacity Electricity Volts Amps Ohms Watts Water Pressure Flow Rate Inverse of channel diameter Volume/Time Data Buffer Size * compression * jumbo frames Transfer Rate *IOPS Latency * Function of Distance * Function of storage type Throughput © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 5. Latency, Speed, & Throughput » When speed is constant, packet size governs throughput. » Larger packets increase throughput. » Greater distance increases latency which lowers perceived throughput. 5 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 6. True speed is all about latency » 1 byte or 1000 bytes, same trip time. » Overhead accounts for more constraint than sum of the serialized trips. 6 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 7. Aren’t we talking about storage? » HDD latency  Rotating the platter  Moving the head » SSD latency  One controller is a gateway for multiple chips » RAID latency  Mirror – Improves read IOPS if split reads is supported.  Stripe – Improves read & write IOPS.  Distributed Parity – Write IOPS penalty for calculating parity bits.  Raid 10 – Mirror & Stripe. No write penalty. Twice the price of stripe only. » SAN latency  One controller is the gateway to many disks.  Limited bandwidth to arrays » NAS latency  Network is usually the weakest link 7 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 8. Enough already, just make it faster! » There’s more than straight line acceleration. » Complex systems force us to tease out the latency bottlenecks » Balancing 3 Options 1. Get the same work done with fewer operations 2. Do more in parallel 3. Make individual operations faster 8 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 9. Get the same work done with fewer operations » In our transportation example, same work with fewer trips … The big semi does this… larger cargo or payload. » With data, however…  Eliminate redundant or superfluous database work • Create indexes that reduce table scans • Keep tables defragmented to increase read-ahead • Keep frequently used data in application memory  Caching techniques to reduce re-reading from storage • SAN cache • Server memory • SQL 2014 Buffer Pool Extension  Compress data • More pages in memory increases page life expectancy • Compressed data will fit into fewer Physical I/Os • ** CPU latency must be lower than storage latency 9 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 10. Do more in parallel » Adding disks to an array increases maximum IOPS  Helps where I/O can be parallelized • Multiple CPU issuing synchronous I/Os • SQL Server Pre-fetch & Read-ahead • Reference: MSDN: Sequential Read Ahead » Defragmentation increases Read-ahead, which is asynchronous » Evaluate for parallel capabilities end to end  Multiple file groups on isolated storage  Multiple, isolated LUNs  Multiple OS disk queues  Consider SAN paths & controllers » Bottom line, you can’t parallelize everything  Business Analogy: The Mythical Man Month  Humorous Analogy: The Pregnancy Problem 10 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 11. Make individual operations faster » Almost always, a winner! But often, the most expensive solution. » Lower latency storage  HDD Moving parts  Mechanical latency  Random reads  More mechanical latency  Thus to optimize, maximize sequential reads before random reads  Of course, with RAID arrays, almost every read is random  SSDs have no moving parts  No mechanical latency  Thus all reads are equal. No benefit to sequential vs random » Who’s IO are we talking about?  Typical disk I/Os are usually 4K  SQL Server I/Os range from 8K to 512K » REF: http://www.confio.com/logicalread/fragmentation-reorganization-rebuilds-sql-server-table-scans-bf01/#.U1aJKvldU9I 11 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 12. How Do I Choose? It depends… :- » It depends… At best, all three. Next best, any combination.  3rd party software may not permit your query tuning  Budget constraints may not permit low latency storage  The size of I/Os may not lend to parallelizing workloads » General rules:  Reducing total # I/Os is always a winner.  For large result sets or concurrency  Increasing IOPS can help a lot  For small result sets  Raw speed (Latency) may be your only hope. 12 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 13. Disk Queue Depth » I hate queues, especially at the DMV! Waiting in line stinks! » Disk Queue Length is a measure of I/O constraint. » How high is OK? It depends on your environment.  Different performance expectation between OLTP and OLAP systems » If it’s consistently high, adding disks to the array may help. » You should be watching this one and DPA does that… 13 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 14. Other WMI Counters » Latency-Like  Avg. Disk Sec/Read is the average time, in seconds, of a read of data from the disk.  Avg. Disk Sec/Write is the average time, in seconds, of a write of data to the disk. » Current-Like  Avg. Disk Reads/Sec is the rate of read operations on the disk.  Avg. Disk Writes/Sec is the rate of write operations on the disk. » Physical Disk: %Disk Time is the percentage of elapsed time that the selected disk drive was busy servicing read or write requests. REF: http://blogs.msdn.com/b/dpless/archive/2010/12/01/leveraging-sys-dm-io-virtual-file-stats.aspx?Redirected=true 14 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 15. Virtual File Stats DMO 15 http://technet.microsoft.com/en-us/library/ms190326.aspx © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 16. Crystal Disk Mark » A great, free tool that tells you the throughput of your storage under a few mixtures of I/O size, queue depth and sequential or random I/O. You may not get your storage admin’s blessing to run this.  But it’s a decent way to measure throughput. 16 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 18. 18 Query Plans & Process Monitor » Query plans tell you when you’re scanning and seeking » ProcMon tells you how many and how big are the storage I/Os © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 19. Server memory, SAN Cache, Tierd Storage etc » You’ll have to clear a few obstacles. » SQL Server caches pages in RAM so when testing you’ll need dump the buffer cache to ensure you are going to disk. » And unless your storage admin is a gift from the DBA gods, you’ll have to get real creative to control for SAN cache in any experiments. » Tiered storage can cause unpredictability too. 19 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 20. Free Tools for SAN & VM environments 20 http://www.solarwinds.com/products/freetools/san_monitor/ http://www.solarwinds.com/products/freetools/storage-response-time-monitor.aspx © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 21. Design Choices : Fragmentation Impacts » Design for Read Ahead  Understand & avoid physical and logical fragmentation  Clustered indexes that monotonously increment on isolated storage  Pre-allocate files in larger swatches rather than auto-grow » Use file groups and different storage based on I/O demand  Rarely accessed things on less performant media  Frequently accessed things on highly performant media » Plan ahead! 21 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 22. DMV Wait Types » Multiple wait types indicate storage I/O » DPA breaks down query execution by wait type over time.  http://database.demo.solarwinds.com/ 22 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 23. DEMONSTRATION TIME! 23 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 24. Think you have Database I/O issues? » DPA can identify and recommend action on I/O issues. » Check out the new Storage I/O feature in DPA 9.0! 24 http://www.solarwinds.com/resources/videos/utilize-dpa-storage-io-to-find-performance-issues.html © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 25. © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED. Quickly resolve Oracle performance issues » Try Database Performance Analyzer FREE for 14 days » Improve root cause of slow performance  Identify issues that impact end-user response time  Isolates root cause in just four clicks  See historical trends over days, months, and years  Understand impact of VMware® performance  Agentless architecture with no dependence on Oracle Packs, installs in minutes www.solarwinds.com/dpa-download/
  • 26. Thank you! » Brian Flynn » brian.flynn@solarwinds.com » Twitter : @brianpaulflynn » LinkedIn: brianpaulflynn 26 © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 27. Questions? © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
  • 28. © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED. Thank You! The SOLARWINDS and SOLARWINDS & Design marks are the exclusive property of SolarWinds Worldwide, LLC, are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other SolarWinds trademarks, service marks, and logos may be common law marks, registered or pending registration in the United States or in other countries. All other trademarks mentioned herein are used for identification purposes only and may be or are trademarks or registered trademarks of their respective companies.