How to configure SQL Server for SSDs and VMs

32
VMs, SSDs and SQL Server Oh, My!

Transcript of How to configure SQL Server for SSDs and VMs

Page 1: How to configure SQL Server for SSDs and VMs

VMs, SSDs and SQL Server—Oh, My!

Page 2: How to configure SQL Server for SSDs and VMs

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

» Principal Consultant, Denny Cherry and Associates

» 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

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

Joeydantoni.com

Page 3: How to configure SQL Server for SSDs and VMs

AGENDA

How SSDs Change the

Game

Being a DBA in a Virtual

Environment

Managing Your SSD

Environment

Storage Policy for Databases

Maximize Your Benefits

3

V M s , S S D s A n d S Q L S e r v e r , O h M y

© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 4: How to configure SQL Server for SSDs and VMs

SPINNING DISK DRIVES

Hard Drives can only spin at 15,000 RPM.

Hard Drive Performance has improved approximately 10x (1988-2008)

Have grown many fold in capacity

During the performance improvement CPU speed increase 10000x

Page 5: How to configure SQL Server for SSDs and VMs

WHY IS STORAGE THE BOTTLENECK?

Page 6: How to configure SQL Server for SSDs and VMs

MEMORY VERSUS HARD DRIVES

Page 7: How to configure SQL Server for SSDs and VMs

SOLID STATE DRIVES

7© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 8: How to configure SQL Server for SSDs and VMs

WHY ARE SSDs SO MUCH FASTER?

8

T H E L AW S O F P H Y S I C S

© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 9: How to configure SQL Server for SSDs and VMs

SAN TERMS

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

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 10: How to configure SQL Server for SSDs and VMs

HOW DOES THIS WORK IN A SAN?

Add Spindles to Add IO Performance

Performance of ONE PCI-E SSD card

• 235,000 8k Random IOPS 20µs latency

You’d Need 3500 15k RPM Spinning Disks in RAID 10 to achieve that level of performance

10© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 11: How to configure SQL Server for SSDs and VMs

SO HOW DO I BENEFIT THE MOST?

Treat SSDs as limited resource

• Use Data Compression where possible

Where does SQL Server bottleneck on IO?

• TempDB—SQL Server uses TempDB for EVERYTHING

• Hot Datafiles—what is your busiest database?

11© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 12: How to configure SQL Server for SSDs and VMs

ALL FLASH ARRAYS

12© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Not just pure speed

Software benefits

Write leveling (randomization)

Compression

Caching

Oh, and Pure Speed Peugeot 905, 24 Hours of LeMans1993, 391 kph/242 mph, MulsanneStraight

Page 13: How to configure SQL Server for SSDs and VMs

MODERN STORAGE ARRAY ARCHITECTURE

Stripes all data across all devices in array (768 kb – 1 MB)

Minimizes impact of any hot spotting

Increases overall performance of array

Makes data file placement far less important than in the past

13© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 14: How to configure SQL Server for SSDs and VMs

OLD ARCHITECTURE

14© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Data Files

TempDB

Transaction Logs

Page 15: How to configure SQL Server for SSDs and VMs

MODERN ARCHITECTURE

15© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

All data is striped across all devices in the array

Page 16: How to configure SQL Server for SSDs and VMs

HYBRID ARRAYS

Mix Performance and Price

• Common config

• SSD Tier

• Fast Spinning Tier

• Dense Spinning Tier

Rely on striping for performance gains

Your storage admin can’t tell you where data is

16© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 17: How to configure SQL Server for SSDs and VMs

DATA FILE LAYOUT

It depends

If using all flash configuration:

• Consider Hot Spots

• Most arrays are smart enough to distribute workload

• If on smart array, there’s no real reason to layout data files

If using hybrid array—see next slide

Always protect your data

17© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 18: How to configure SQL Server for SSDs and VMs

HYBRID ARRAY POLICY

SSD SSD SSD

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

10K SATA 10K SATA 10K SATA

Log

DataTemp

DB

TempDB (2)

Page 19: How to configure SQL Server for SSDs and VMs

HYBRID ARRAYS FILE LAYOUT

•TempDB Performance

•TempDB Normal

•Transaction Logs

• Data Files Performance

• Data Files Normal

Separate Volumes by SAN Policy

19 |

Page 20: How to configure SQL Server for SSDs and VMs

ALL FLASH LAYOUT

It doesn’t matter!

Software eliminates sequential write performance issues

Data is striped across entire array for protection

20 |

Page 21: How to configure SQL Server for SSDs and VMs

ARRAY BASED

COMPRESSION

21 |

W H AT D O E S T H I S M E A N F O R D ATA B A S E S ?

Page 22: How to configure SQL Server for SSDs and VMs

ARRAY BASED COMPRESSION

Needs more research

Early consensus from two storage vendors is positive

Keep using Data Compression

Keep using Columnstore

Not just IO benefits, but memory improvements

22 |

Page 23: How to configure SQL Server for SSDs and VMs

What is the Impact of Virtual

Machine Performance?

23 |

Page 24: How to configure SQL Server for SSDs and VMs

DATASTORES

It can be easy to overwhelm storage if not enough storage devices are presented

Datastores will correspond to SAN policy groups

VMs Love Fast IO

Page 25: How to configure SQL Server for SSDs and VMs

DRIVERS AND STORAGE CONFIG

Avoid Lazy Zeroing on Drive Volumes

• Thick Provision Eager Zeroed

Group VMDK files of each storage type

(TempDB, Logs, Data) in storage pools

Use ParaVirtual iSCSI drivers for optimal

performance

25 |

Page 26: How to configure SQL Server for SSDs and VMs

VIRTUALIZING SQL SERVER

Reserve memory for production workloads

Also reserve memory in Hypervisor for Prod Servers

Configure storage and data files based on SAN policy

Baseline IO performance

Page 27: How to configure SQL Server for SSDs and VMs

VIRTUALIZING SQL SERVER

Think carefully about using lock pages in memory*

Enable optimize for ad-hoc workloads

DON’T OVERALLOCATE CPUs

Page 28: How to configure SQL Server for SSDs and VMs

DPA WITH VM OPTION

» See correlations

between SQL

Server performance

and VM resources,

the physical host,

storage and the

network

» Identify root cause

of issues impacting

end user response

time

28 |

Page 29: How to configure SQL Server for SSDs and VMs

SUMMARY

Understand impact of storage to your SQL Server

Solid State Drives are FAST!!!!

Gain understanding of the type of array that you are working on

Design your SQL Server architecture to take advantage of that

Understand your virtualization environment of how this all works together

29 |

Page 30: How to configure SQL Server for SSDs and VMs

QUESTIONS?

© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED. 30

Page 31: How to configure SQL Server for SSDs and VMs

FREE TRIAL

• Try Database Performance Analyzer with VM Option FREE for 14

days

• Improve performance

• Quickly identify root cause of issues that impact end-user response time

• See historical trends over days, months, and years

• Understand impact of VMware® performance

• Agentless architecture, installs in minutes

31

R E S O LV E P E R F O R M A N C E I S S U E S Q U I C K LY

© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

www.solarwinds.com/dpa-download/

Page 32: How to configure SQL Server for SSDs and VMs

THANK YOU

© 2015 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

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.

32