Knut Relbe-Moe
Office 365 MVP
Chief Technical Architect
Knut Relbe-Moe
My Experience:
 SharePoint evangelist, mentor, speaker
 Old developer, turned Architect / ITPro
 Have worked with SharePoint since the 2003 version.
 Worked with several clients upgrading their solution from 2007/2010 to 2013.
 Works as a Lead Architect and advisor creating SharePoint Farm
architecture/infrastructure on many projects. With up to 25.000 users.
 Worked with automating the installation and configuration of SharePoint.
Chief TechnicalArchitect
Knowledge Factory,Oslo, Norway
Office365 MVP
Migration Expert
Educator forGlasspaper
Nintex VirtualTechnicalEvangelist
Knut.Relbe-
moe@knowledgefa
ctory.no
http://www.sharepointblog.no@shareptkarm +47 982 24 609
MS SQL Server is like the brain of your
SharePoint environment
So if the brain works slow, everything
else will be slow….
• Follow the guidelines in this presentation
• Read and understand this whitepaper from Vlad Catrienscu
• Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper
• If you have to reinstall MS SQL server as a new instance with the
correct settings.
How to fix this
• Physical SQL Server will always outperform a virtual SQL server with
the same specs, but what shall you choose.
• Pros :
• High availability because of the hypervisor, not because of clustering
• Easier to scale up & down
• Can be easier to recover at Disaster Recovery
• Cons:
• Very heavily loaded VMs have seen disk I/O issues
• Over allocation of a virtual host. If you have too much running on a host,
it's not just I/O that could be impacted.
• Harder to protect
Physical vs Virtual
• You should invest in as fast disk as possible
• If you run on a Virtual Server, consider physical disks for the SQL
server
• SSD or SAN
• If you have physical SQL server you should use at least 6 Disks:
1. TempDB
2. TempDB Logs
3. SharePoint Databases
4. SharePoint Databases Logs
5. OS
6. SQL binaries and other application Installs
DISKS
• You have a farm where most of the content is only read and
downloaded
• Your users will be collaborating, uploading documents, content
Speed/Scenario Read Intensive Scenario (ex Public Website)
Fastest Tempdb data files and transaction logs
. Database data files
. Search databases, except for the Search administration database
Slowest Database transaction log files
DISKS
Speed/Scenario Write Intensive Scenario ( collaborative workspace)
Fastest Tempdb data files and transaction logs
. Database transaction log files
. Search databases, except for the Search administration database
Slowest Database data files
• Your SQL Server needs to have enough RAM to function properly.
• If your SQL Server runs only SharePoint, here are the minimum
requirements
Small Farm
Deployment
(0-500GB of
Data)
Medium Farm
Deployment
(501-1TB of
data)
Large Farm
Deployment
(1-2TB of Data)
Very Large
Farm Deployment
(2-5 TB of Data)
Special
Cases
Ram Required 8GB 16GB 32 GB 64GB 64GB+
CPU 4 4 8 8 8
RAM & CPU
• SQL server reads and writes 64k at a time
• So change your allocation size from the 4K default to 64K.
• This small change alone, will improve your SQL performance by up
to 30%
NTFS Allocation size
Server Configuration – Collation
• SharePoint server 2013 is built to use Latin1_General_CI_AS_KS_WS.
This is a quote from Microsoft to prove it:
• “We support any CI collation for the SQL instance (for master, tempdb
databases). However we recommend using
Latin1_General_CI_AS_KS_WS as the instance default collation
(master, tempdb databases).”
• CI – (Case Insensitive) A and a ARE treated as the same character.
• AS – (Accent Sensitive) a and á are NOT treated as the same character.
• KS – (Kana Sensitive) Japanese Hirakana and Katakana characters which look
the same are NOT treated as the same character.
• WS – (Width Sensitive) Single-Byte and Double-Byte versions of the same
character are NOT treated as the same character.
Max Memory
SQL Server (and other database systems such as
Oracle and Sybase) need to read data pages into their
internal memory before they can be used. Of course
your server needs memory to operate as well. When
your database engine and your server are competing
for the same memory resources, you get bad
performance. You want your server and your database
engine to be like dancing partners, and less like my
kids fighting over the last cupcake.
Thomas Larock from SQL Rockstar explains this:
Optimize TempdB
• Split across n locations
• N = total number of physical cores > super myth
• 25% of largest content dB
• The fastest disk possible
Default fill factor to 80
“SharePoint, a server wide setting of 80 is optimal to support
growth and minimize fragmentation.”
Model Database
• SQL Server uses the Model database as a template for creating new
user databases
• So therefor make sure that Model database have correct initial size
and growth settings.
• The log should be around 25% of the initial size.
• The auto growth is your insurance policy if your current database size has
been reached.
Script
Auto Create Statistics
• Do not enable auto-create statistics on a server that hosts SQL Server
and SharePoint Server
• Enabling auto-create statistics is not supported for SharePoint Server
USE “DBA” created databases
• Sizing
• Autogrowth
• DO NOT USE SIMPLE RECOVERY
• Unless you understand the implications
Maintenance Plan
• Create a maintenance plan to backup databases, rebuild indexes and
checking the logical and physical integrity of your database
• Make sure you don’t run backup when heavy timer jobs runs in the
SharePoint environment, like midnight
Script your SQL Server installation
• https://sqlserverfinebuild.codeplex.com/
Always install SQL Alias in
SharePoint
10 simple tips to maximize
performance
http://www.sharepointblog.no/?p=85
1. SSD Disk or better
2. Formating disk with 64K
3. Language corralation Latin_CI_AS_KS_WS
4. Maximum memory
5. Changed Sizes on Model database
6. Default fill factor to 80
7. Switched of autocreate statistics
8. Max Degree of Parallelism – set to 1 (it has to be)
9. Changed Initial Size & Autogrow on temp database, and created extra temp files for the
amount of processors.
10. Don’t do backups at midnight.
Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper by Vlad Catrinescu
@shareptkarmOffice 365
Questions?
Knut Relbe-Moe
Chief Technical Architect
Knut.relbe-moe@knowledgefactory.com
shareptkarm@outlook.com

Get your SharePoint spinning with SQL Server

  • 1.
    Knut Relbe-Moe Office 365MVP Chief Technical Architect
  • 2.
    Knut Relbe-Moe My Experience: SharePoint evangelist, mentor, speaker  Old developer, turned Architect / ITPro  Have worked with SharePoint since the 2003 version.  Worked with several clients upgrading their solution from 2007/2010 to 2013.  Works as a Lead Architect and advisor creating SharePoint Farm architecture/infrastructure on many projects. With up to 25.000 users.  Worked with automating the installation and configuration of SharePoint. Chief TechnicalArchitect Knowledge Factory,Oslo, Norway Office365 MVP Migration Expert Educator forGlasspaper Nintex VirtualTechnicalEvangelist Knut.Relbe- moe@knowledgefa ctory.no http://www.sharepointblog.no@shareptkarm +47 982 24 609
  • 3.
    MS SQL Serveris like the brain of your SharePoint environment
  • 4.
    So if thebrain works slow, everything else will be slow….
  • 5.
    • Follow theguidelines in this presentation • Read and understand this whitepaper from Vlad Catrienscu • Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper • If you have to reinstall MS SQL server as a new instance with the correct settings. How to fix this
  • 7.
    • Physical SQLServer will always outperform a virtual SQL server with the same specs, but what shall you choose. • Pros : • High availability because of the hypervisor, not because of clustering • Easier to scale up & down • Can be easier to recover at Disaster Recovery • Cons: • Very heavily loaded VMs have seen disk I/O issues • Over allocation of a virtual host. If you have too much running on a host, it's not just I/O that could be impacted. • Harder to protect Physical vs Virtual
  • 9.
    • You shouldinvest in as fast disk as possible • If you run on a Virtual Server, consider physical disks for the SQL server • SSD or SAN • If you have physical SQL server you should use at least 6 Disks: 1. TempDB 2. TempDB Logs 3. SharePoint Databases 4. SharePoint Databases Logs 5. OS 6. SQL binaries and other application Installs DISKS
  • 10.
    • You havea farm where most of the content is only read and downloaded • Your users will be collaborating, uploading documents, content Speed/Scenario Read Intensive Scenario (ex Public Website) Fastest Tempdb data files and transaction logs . Database data files . Search databases, except for the Search administration database Slowest Database transaction log files DISKS Speed/Scenario Write Intensive Scenario ( collaborative workspace) Fastest Tempdb data files and transaction logs . Database transaction log files . Search databases, except for the Search administration database Slowest Database data files
  • 12.
    • Your SQLServer needs to have enough RAM to function properly. • If your SQL Server runs only SharePoint, here are the minimum requirements Small Farm Deployment (0-500GB of Data) Medium Farm Deployment (501-1TB of data) Large Farm Deployment (1-2TB of Data) Very Large Farm Deployment (2-5 TB of Data) Special Cases Ram Required 8GB 16GB 32 GB 64GB 64GB+ CPU 4 4 8 8 8 RAM & CPU
  • 14.
    • SQL serverreads and writes 64k at a time • So change your allocation size from the 4K default to 64K. • This small change alone, will improve your SQL performance by up to 30% NTFS Allocation size
  • 16.
    Server Configuration –Collation • SharePoint server 2013 is built to use Latin1_General_CI_AS_KS_WS. This is a quote from Microsoft to prove it: • “We support any CI collation for the SQL instance (for master, tempdb databases). However we recommend using Latin1_General_CI_AS_KS_WS as the instance default collation (master, tempdb databases).” • CI – (Case Insensitive) A and a ARE treated as the same character. • AS – (Accent Sensitive) a and á are NOT treated as the same character. • KS – (Kana Sensitive) Japanese Hirakana and Katakana characters which look the same are NOT treated as the same character. • WS – (Width Sensitive) Single-Byte and Double-Byte versions of the same character are NOT treated as the same character.
  • 18.
    Max Memory SQL Server(and other database systems such as Oracle and Sybase) need to read data pages into their internal memory before they can be used. Of course your server needs memory to operate as well. When your database engine and your server are competing for the same memory resources, you get bad performance. You want your server and your database engine to be like dancing partners, and less like my kids fighting over the last cupcake. Thomas Larock from SQL Rockstar explains this:
  • 20.
    Optimize TempdB • Splitacross n locations • N = total number of physical cores > super myth • 25% of largest content dB • The fastest disk possible
  • 22.
    Default fill factorto 80 “SharePoint, a server wide setting of 80 is optimal to support growth and minimize fragmentation.”
  • 24.
    Model Database • SQLServer uses the Model database as a template for creating new user databases • So therefor make sure that Model database have correct initial size and growth settings. • The log should be around 25% of the initial size. • The auto growth is your insurance policy if your current database size has been reached.
  • 25.
  • 27.
    Auto Create Statistics •Do not enable auto-create statistics on a server that hosts SQL Server and SharePoint Server • Enabling auto-create statistics is not supported for SharePoint Server
  • 29.
    USE “DBA” createddatabases • Sizing • Autogrowth • DO NOT USE SIMPLE RECOVERY • Unless you understand the implications
  • 31.
    Maintenance Plan • Createa maintenance plan to backup databases, rebuild indexes and checking the logical and physical integrity of your database • Make sure you don’t run backup when heavy timer jobs runs in the SharePoint environment, like midnight
  • 33.
    Script your SQLServer installation • https://sqlserverfinebuild.codeplex.com/
  • 35.
    Always install SQLAlias in SharePoint
  • 37.
    10 simple tipsto maximize performance http://www.sharepointblog.no/?p=85 1. SSD Disk or better 2. Formating disk with 64K 3. Language corralation Latin_CI_AS_KS_WS 4. Maximum memory 5. Changed Sizes on Model database 6. Default fill factor to 80 7. Switched of autocreate statistics 8. Max Degree of Parallelism – set to 1 (it has to be) 9. Changed Initial Size & Autogrow on temp database, and created extra temp files for the amount of processors. 10. Don’t do backups at midnight. Maximizing SQL 2012 Performance for SharePoint 2013 WhitePaper by Vlad Catrinescu
  • 38.
  • 39.
    Knut Relbe-Moe Chief TechnicalArchitect Knut.relbe-moe@knowledgefactory.com shareptkarm@outlook.com