is this really a san problem? understanding the performance of your io subsystem

30
EMBARCADERO TECHNOLOGIES EMBARCADERO TECHNOLOGIES Is This Really a SAN Problem? Understanding the Performance of Your I/O Subsystem Joey D’Antoni 16 September 2015

Upload: embarcadero-technologies

Post on 20-Jan-2017

343 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

Is This Really a SAN Problem?Understanding the Performance ofYour I/O Subsystem

Joey D’Antoni

16 September 2015

Page 2: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Joey D’Antoni

• Joey has over 15 years of experience with a wide variety of data platforms, in both Fortune 50 companies as well as smaller organizations

• He is a frequent speaker on database administration, big data, and career management

• He is the co-president of the Philadelphia SQL Server User’s Group

• MSCE, Business Intelligence, Database Administration

• He wants you to make sure you can restore your data

Joeydantoni.com

Page 3: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Agenda

SAN and Storage Architecture

The Language of the SAN Admin

How SQL Server uses Storage

Troubleshooting Performance Issues

Summary

Page 4: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

Poll

Who Are You?

Page 5: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Bottlenecks

Page 6: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Memory versus Hard Drives

Page 7: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Storage Area Network

Page 8: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

What is a SAN?

Basically a specialized

computer for storage

Computer, Switches and Hard

Drives

Not a performance device

Can be used for redundancy and DR

purposes

Will serve many servers—so critical

piece of your infrastructure

Page 9: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

SAN Components

HBA (Fibre) Card—Connects your server to SAN via Fiber Optic cable

iSCSI Card—Ethernet Card connecting server to SAN

Switch—Either fibre or ethernet switch connecting server to SAN

SAN head unit—Controls processing, RAID levels

Disk Array—The physical array behind your SAN (a bunch of hard drives)

Page 10: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

SAN Terms

LUN—Logical Unit Number, but in practical terms, what your SAN admin will call a disk that he presents to your server

Fibre Channel—Cable connection to SAN

IOPs—I/O Operations Per Second—the way your SAN admin measures performance

Page 11: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Multi-Pathing

How your SAN admin sleeps at night!

Make sure your databases servers are multi-pathed

Page 12: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

SAN Throughput

0 200 400 600 800 1000 1200 1400

1 GB iSCSI

4 GB FC

8 GB FC

10 GB iSCSI

Max Mb/S

Max Mb/S

Page 13: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Tiered Storage (Example—EMC VMax)

Allows for dynamic moves of disk from faster to slower disks (Fibre channel to SATA), or slower to faster (FC to SSD)

Totally dynamic, and seamless to servers

Moves data in 768k extents

Your SAN admin doesn’t know where your data is

Page 14: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

FAST VP

SSD SSD SSD

15K Fibre Channel 15k Fibre Channel 15k Fibre Channel

10K SATA 10K SATA 10K SATA

Log

Data

Page 15: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

How to Tune a SAN

Properly configure the array

Spend lots of money

Page 16: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

Poll

How Frequently Do You Meet with Your SAN Team?

Page 17: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

SQL Server and Storage

Page 18: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

SQL Server Storage

SQL Server uses 8k pages to store data

Data is read page by page

Data is written page by page

Pages are grouped into 64k extents

I/O patterns are mixed random and sequential

Logical and Physical Reads

Page 19: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Large I/O Operations in SQL Server

Checkpoints

Scans

Check DB

Transaction Logging

Page 20: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Sequential Operations

Transaction Log writes

Backup

Read-Ahead

Page 21: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Writing Pages to Disk

Lazy WritingEager

writingCheckpoints

Page 22: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

SQL Server I/O Demo

Page 23: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

How to Monitor I/O in SQL Server

• DMVs

• Windows/Perfmon

• Correlate Profiler/Perfmon

Page 24: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

Poll

How Do You Monitor Performance Over Time?

Page 25: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIESEMBARCADERO TECHNOLOGIES

Perfmon Demo

Page 26: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

What Perfmon Counters are Good/Bad for SQL and SANs• Avg. Disk Bytes/Read• Avg. Disk Bytes/Transfer• Avg. Disk Bytes/Write• Avg. Disk sec/Read• Avg. Disk sec/Transfer• Avg. Disk sec/Write• Disk Bytes/sec• Disk Read Bytes/sec• Disk Reads/sec• Disk Transfers/sec• Disk Write Bytes/sec• Disk Writes/sec• Split I/O/Sec

• % Disk Read Time• % Disk Time• % Disk Write Time• % Idle Time• Avg. Disk Queue Length• Avg. Disk Read Queue Length• Avg. Disk Write Queue Length• Current Disk Queue Length

Page 27: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

What to Look for in SQL Server

Missing Indexes

Queries with scans

Page Life Expectancy

It is very important to baseline this data—before and after are critical

Page 28: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

8 Tips for DBAs

Baseline test your SAN before it gets loaded

Baseline your SQL Server Performance

Understand any changes in user workload through your baselines

Work with storage team to understand your storage environment

Be careful of SAN firmware upgrades

Don’t blame the SAN until you have all of your data in place

If performance is absolutely critical use local storage

SANs, while cool, are not magic

Page 29: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Summary

Learn how the SAN works, what it does and does not do

Understand when and where SQL Server does its I/O

SANs may not measure frequently enough

Windows gives the best storage information

You need to trend this data overtime to really understand your environment

Page 30: Is This Really a SAN Problem? Understanding the Performance of  Your IO Subsystem

EMBARCADERO TECHNOLOGIES

Questions