95
for Maximum SharePoint 2010/2013 Performance

Database Configuration for Maximum SharePoint 2010 Performance

Embed Size (px)

DESCRIPTION

Database configuration has a direct impact on how SharePoint 2010 performs. This presentation looks at the SQL Server database and what configuration changes can be made to maximize performance for your SharePoint 2010 farms

Citation preview

Page 1: Database Configuration for Maximum SharePoint 2010 Performance

for

MaximumSharePoint 2010/2013

Performance

Page 2: Database Configuration for Maximum SharePoint 2010 Performance

http://[email protected]@EdwinMSarmientohttp://ca.linkedin.com/in/EdwinMSarmiento

Microsoft MVP - SQL Server

Page 3: Database Configuration for Maximum SharePoint 2010 Performance

Henry Kremer had a vision of having

human-powered airplanes

Page 4: Database Configuration for Maximum SharePoint 2010 Performance

- Dr. Paul MacCready, American aeronautical engineer -

The problem is that

Page 5: Database Configuration for Maximum SharePoint 2010 Performance

it is

problems

NO DIFFERENTfrom how we

performance

Page 6: Database Configuration for Maximum SharePoint 2010 Performance

duct tape fixes

Page 7: Database Configuration for Maximum SharePoint 2010 Performance

what

if

problemswe look at the same

Page 8: Database Configuration for Maximum SharePoint 2010 Performance
Page 9: Database Configuration for Maximum SharePoint 2010 Performance

let’s look at the

databaseto

improvehow we can

performance

Page 10: Database Configuration for Maximum SharePoint 2010 Performance
Page 11: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databaseneeds

8-cores,x64

16 GB

Page 12: Database Configuration for Maximum SharePoint 2010 Performance

but we already

KNOWthat

Page 13: Database Configuration for Maximum SharePoint 2010 Performance

but we already

KNOWthat

or do we

Page 14: Database Configuration for Maximum SharePoint 2010 Performance

MDF/NDF

LDF

a SharePoint

databasehas

Page 15: Database Configuration for Maximum SharePoint 2010 Performance

MDF/NDF

LDF

a SharePoint

databasehas

which are simply just

Page 16: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

which are simply just

Page 17: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

their file access patterns

Page 18: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

MDF/NDFread-write behavior:

Page 19: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

LDFread-write behavior:

Page 20: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

stored inside

Page 21: Database Configuration for Maximum SharePoint 2010 Performance

a SharePoint

databasehas

MDF/NDF

LDF

stored inside

Page 22: Database Configuration for Maximum SharePoint 2010 Performance

let’s answer a few

questionsbased on this information

Page 23: Database Configuration for Maximum SharePoint 2010 Performance

let’s answer a few

based on this information

what would happen if the files are stored on

multiple disks

questions

Page 24: Database Configuration for Maximum SharePoint 2010 Performance

let’s answer a few

based on this information

what would happen if we have

multiple files

questions

Page 25: Database Configuration for Maximum SharePoint 2010 Performance

let’s answer a few

based on this information

on

multiple disks

multiple files

questions

Page 26: Database Configuration for Maximum SharePoint 2010 Performance

then

single drive

are we storingdatabase files in a

Page 27: Database Configuration for Maximum SharePoint 2010 Performance

then

system drive

are we storingdatabase files in the

Page 28: Database Configuration for Maximum SharePoint 2010 Performance
Page 29: Database Configuration for Maximum SharePoint 2010 Performance

provision

capacity

based on

performance

&

Page 30: Database Configuration for Maximum SharePoint 2010 Performance

some

Page 31: Database Configuration for Maximum SharePoint 2010 Performance

some

measure*I/O system performance

BEFORE deployment

*a utility called can be used for this

Page 32: Database Configuration for Maximum SharePoint 2010 Performance

some

measure*I/O system performance

BEFORE deploymentbecause you want to know if you’re

getting what was promised

Page 33: Database Configuration for Maximum SharePoint 2010 Performance

some

create multiple data filesbecause you can have multiple disks

doing their job for you

*only supported on filegroup

Page 34: Database Configuration for Maximum SharePoint 2010 Performance

some

create multiple data filesbecause you can have multiple disks

doing their job for you

*I usually start with data files

Page 35: Database Configuration for Maximum SharePoint 2010 Performance

some

move database files OUT of the system partition

because your system partition is already

doing something else

Page 36: Database Configuration for Maximum SharePoint 2010 Performance

some

use RAID 10

for better protection & write performance

Page 37: Database Configuration for Maximum SharePoint 2010 Performance

some

physically* separate MDF from LDF

because they have different access patterns

*your may tell you otherwise

Page 38: Database Configuration for Maximum SharePoint 2010 Performance

some

format the LUNs* with 64K clustersbecause SQL Server works in 64K chunks

*for both &

Page 39: Database Configuration for Maximum SharePoint 2010 Performance

some

pre-size MDF/NDF and LDF filesbecause you don’t want your storage

to work harder

Page 40: Database Configuration for Maximum SharePoint 2010 Performance

some

make all file & autogrowth sizes EQUAL

because SQL Server uses the

proportional fill algorithm

Page 41: Database Configuration for Maximum SharePoint 2010 Performance

some

make all file & autogrowth sizes EQUAL

and because you don’t want your

storage to work harder

Page 42: Database Configuration for Maximum SharePoint 2010 Performance

hidden

process of reclaiming used disk space

without having to ZERO it out

Page 43: Database Configuration for Maximum SharePoint 2010 Performance
Page 44: Database Configuration for Maximum SharePoint 2010 Performance
Page 45: Database Configuration for Maximum SharePoint 2010 Performance

configuring instant file initialization

Page 46: Database Configuration for Maximum SharePoint 2010 Performance

log (LDF) files are NOT affected by instant file initialization

Page 47: Database Configuration for Maximum SharePoint 2010 Performance

some

pre-size MDF/NDF and LDF filesthat’s why you need to

Page 48: Database Configuration for Maximum SharePoint 2010 Performance

understanding

Page 49: Database Configuration for Maximum SharePoint 2010 Performance

have you ever

wondered what that

recovery model

is for?

Page 50: Database Configuration for Maximum SharePoint 2010 Performance
Page 51: Database Configuration for Maximum SharePoint 2010 Performance

all database changes are written in the log

Page 52: Database Configuration for Maximum SharePoint 2010 Performance

this allows for point-in-time recoverability

Page 53: Database Configuration for Maximum SharePoint 2010 Performance

the log gets full over time

Page 54: Database Configuration for Maximum SharePoint 2010 Performance

the log gets full over time

Page 55: Database Configuration for Maximum SharePoint 2010 Performance

the log gets full over time

Page 56: Database Configuration for Maximum SharePoint 2010 Performance

the log gets full over time

Page 57: Database Configuration for Maximum SharePoint 2010 Performance

the log gets full over time

Page 58: Database Configuration for Maximum SharePoint 2010 Performance

what happens if it gets FULL?

Page 59: Database Configuration for Maximum SharePoint 2010 Performance

what happens if it gets FULL?

it

GROWS

we’re assuming autogrowth is configured

Page 60: Database Configuration for Maximum SharePoint 2010 Performance

what happens if it gets FULL?

and

GROWS

Page 61: Database Configuration for Maximum SharePoint 2010 Performance

what happens if it gets FULL?

and

GROWS

Page 62: Database Configuration for Maximum SharePoint 2010 Performance

when itit has to ZERO out the file

Page 63: Database Configuration for Maximum SharePoint 2010 Performance

when itit has to ZERO out the file

which also means that transactions

are waiting for the autogrowth

process to complete before they can

continue

Page 64: Database Configuration for Maximum SharePoint 2010 Performance

when the disk containing the log (LDF)

file gets full, the database automatically

becomes read-only

even

Page 65: Database Configuration for Maximum SharePoint 2010 Performance

log file growth causing database to be read-only

Page 66: Database Configuration for Maximum SharePoint 2010 Performance

can we AVOID this

Page 67: Database Configuration for Maximum SharePoint 2010 Performance

changing to

recovery model

you don’t want to do this if you’re concerned about

point-in-time recoverability

Page 68: Database Configuration for Maximum SharePoint 2010 Performance

run regular

Page 69: Database Configuration for Maximum SharePoint 2010 Performance

and

Page 70: Database Configuration for Maximum SharePoint 2010 Performance

shrinking your databases

Page 71: Database Configuration for Maximum SharePoint 2010 Performance

effects of shrinking databases on index fragmentation

Page 72: Database Configuration for Maximum SharePoint 2010 Performance

configuration

create ¼ the number of files per CPU core

*I usually start with 4 data files of equal size and autogrowth increments

Page 73: Database Configuration for Maximum SharePoint 2010 Performance

configuration

place database files on faster drive

Page 74: Database Configuration for Maximum SharePoint 2010 Performance

configuration

place database files on protected drive

*because SQL Server WILL NOT START without tempdb

Page 75: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

available in SQL Server 2008 and higher

Page 76: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

the faster the backups complete, the more

resources are available for the database

Page 77: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

also very useful for high

availability and disaster recovery

Page 78: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

this is documented - http://technet.microsoft.com/en-us/library/cc298801.aspx#Section6

we, DBAs, are confused because this

is not OUR best practice

*look for the proc_UpdateStatistics stored procedure

Page 79: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

we, DBAs, are confused because this

is not OUR best practice

this is documented - http://technet.microsoft.com/en-us/library/cc298801.aspx#Section6

*look for the proc_UpdateStatistics stored procedure

Page 80: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

we, DBAs, are confused because this

is not OUR best practice

this is documented - http://technet.microsoft.com/en-us/library/cc298801.aspx#Section6

Page 81: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

we want to avoid PAGE SPLITS

Page 82: Database Configuration for Maximum SharePoint 2010 Performance

other configuration

applies to Standard Edition

*because Enterprise Edition already has this by default

Page 83: Database Configuration for Maximum SharePoint 2010 Performance

checking and setting database configuration

Page 84: Database Configuration for Maximum SharePoint 2010 Performance

http://technet.microsoft.com/en-us/library/cc262731.aspx

Page 85: Database Configuration for Maximum SharePoint 2010 Performance

perform REGULAR consistency checks

http://technet.microsoft.com/en-us/library/cc262731.aspx

*test implementing Trace Flag 2549 & 2562 KB 2634571

SQL Server 2008 SP2 and higher

Page 86: Database Configuration for Maximum SharePoint 2010 Performance

perform REGULAR index maintenance

http://technet.microsoft.com/en-us/library/cc262731.aspx

*look for the proc_DefragmentIndices stored procedure

Page 87: Database Configuration for Maximum SharePoint 2010 Performance

exclude SQL Server files on your AV scan

http://support.microsoft.com/kb/309422

How to choose antivirus software to run on computers that are running SQL Server

Page 88: Database Configuration for Maximum SharePoint 2010 Performance

patterndid you NOTICE a common

in all of the

Page 89: Database Configuration for Maximum SharePoint 2010 Performance

I/Othey ALL pertain to

performance

Page 90: Database Configuration for Maximum SharePoint 2010 Performance

great DBAthe SECRET to becoming a

I just told you

Page 91: Database Configuration for Maximum SharePoint 2010 Performance
Page 92: Database Configuration for Maximum SharePoint 2010 Performance

TALK to your SQL Server DBAs

Page 93: Database Configuration for Maximum SharePoint 2010 Performance

IMPLEMENT these changes

Page 94: Database Configuration for Maximum SharePoint 2010 Performance

Questions

Page 95: Database Configuration for Maximum SharePoint 2010 Performance

http://[email protected]@EdwinMSarmientohttp://ca.linkedin.com/in/EdwinMSarmiento

Microsoft MVP - SQL Server