Database Configuration for Maximum SharePoint 2010 Performance
-
Upload
edwin-sarmiento -
Category
Technology
-
view
6.023 -
download
3
description
Transcript of Database Configuration for Maximum SharePoint 2010 Performance
for
MaximumSharePoint 2010/2013
Performance
http://[email protected]@EdwinMSarmientohttp://ca.linkedin.com/in/EdwinMSarmiento
Microsoft MVP - SQL Server
Henry Kremer had a vision of having
human-powered airplanes
“
- Dr. Paul MacCready, American aeronautical engineer -
The problem is that
“
it is
problems
NO DIFFERENTfrom how we
performance
duct tape fixes
what
if
problemswe look at the same
let’s look at the
databaseto
improvehow we can
performance
a SharePoint
databaseneeds
8-cores,x64
16 GB
but we already
KNOWthat
but we already
KNOWthat
or do we
MDF/NDF
LDF
a SharePoint
databasehas
MDF/NDF
LDF
a SharePoint
databasehas
which are simply just
a SharePoint
databasehas
MDF/NDF
LDF
which are simply just
a SharePoint
databasehas
MDF/NDF
LDF
their file access patterns
a SharePoint
databasehas
MDF/NDF
LDF
MDF/NDFread-write behavior:
a SharePoint
databasehas
MDF/NDF
LDF
LDFread-write behavior:
a SharePoint
databasehas
MDF/NDF
LDF
stored inside
a SharePoint
databasehas
MDF/NDF
LDF
stored inside
let’s answer a few
questionsbased on this information
let’s answer a few
based on this information
what would happen if the files are stored on
multiple disks
questions
let’s answer a few
based on this information
what would happen if we have
multiple files
questions
let’s answer a few
based on this information
on
multiple disks
multiple files
questions
then
single drive
are we storingdatabase files in a
then
system drive
are we storingdatabase files in the
provision
capacity
based on
performance
&
some
some
measure*I/O system performance
BEFORE deployment
*a utility called can be used for this
some
measure*I/O system performance
BEFORE deploymentbecause you want to know if you’re
getting what was promised
some
create multiple data filesbecause you can have multiple disks
doing their job for you
*only supported on filegroup
some
create multiple data filesbecause you can have multiple disks
doing their job for you
*I usually start with data files
some
move database files OUT of the system partition
because your system partition is already
doing something else
some
use RAID 10
for better protection & write performance
some
physically* separate MDF from LDF
because they have different access patterns
*your may tell you otherwise
some
format the LUNs* with 64K clustersbecause SQL Server works in 64K chunks
*for both &
some
pre-size MDF/NDF and LDF filesbecause you don’t want your storage
to work harder
some
make all file & autogrowth sizes EQUAL
because SQL Server uses the
proportional fill algorithm
some
make all file & autogrowth sizes EQUAL
and because you don’t want your
storage to work harder
hidden
process of reclaiming used disk space
without having to ZERO it out
configuring instant file initialization
log (LDF) files are NOT affected by instant file initialization
some
pre-size MDF/NDF and LDF filesthat’s why you need to
understanding
have you ever
wondered what that
recovery model
is for?
all database changes are written in the log
this allows for point-in-time recoverability
the log gets full over time
the log gets full over time
the log gets full over time
the log gets full over time
the log gets full over time
what happens if it gets FULL?
what happens if it gets FULL?
it
GROWS
we’re assuming autogrowth is configured
what happens if it gets FULL?
and
GROWS
what happens if it gets FULL?
and
GROWS
when itit has to ZERO out the file
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
when the disk containing the log (LDF)
file gets full, the database automatically
becomes read-only
even
log file growth causing database to be read-only
can we AVOID this
changing to
recovery model
you don’t want to do this if you’re concerned about
point-in-time recoverability
run regular
and
shrinking your databases
effects of shrinking databases on index fragmentation
configuration
create ¼ the number of files per CPU core
*I usually start with 4 data files of equal size and autogrowth increments
configuration
place database files on faster drive
configuration
place database files on protected drive
*because SQL Server WILL NOT START without tempdb
other configuration
available in SQL Server 2008 and higher
other configuration
the faster the backups complete, the more
resources are available for the database
other configuration
also very useful for high
availability and disaster recovery
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
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
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
other configuration
we want to avoid PAGE SPLITS
other configuration
applies to Standard Edition
*because Enterprise Edition already has this by default
checking and setting database configuration
http://technet.microsoft.com/en-us/library/cc262731.aspx
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
perform REGULAR index maintenance
http://technet.microsoft.com/en-us/library/cc262731.aspx
*look for the proc_DefragmentIndices stored procedure
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
patterndid you NOTICE a common
in all of the
I/Othey ALL pertain to
performance
great DBAthe SECRET to becoming a
I just told you
TALK to your SQL Server DBAs
IMPLEMENT these changes
Questions
http://[email protected]@EdwinMSarmientohttp://ca.linkedin.com/in/EdwinMSarmiento
Microsoft MVP - SQL Server