+ All Categories
Home > Presentations & Public Speaking > Get your SharePoint spinning with SQL Server

Get your SharePoint spinning with SQL Server

Date post: 29-Jul-2015
Category:
Upload: knut-relbe-moe-mvp-mct
View: 288 times
Download: 2 times
Share this document with a friend
39
Getting SQL Spinning with SharePoint – Best Practices for the Back End Knut Relbe-Moe Office 365 MVP Chief Technical Architect
Transcript
Page 1: Get your SharePoint spinning with SQL Server

Getting SQL Spinning with SharePoint – Best Practices for the Back EndKnut Relbe-MoeOffice 365 MVPChief Technical Architect

Page 2: Get your SharePoint spinning with SQL Server

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 Technical ArchitectKnowledge Factory, Oslo, NorwayOffice 365 MVPMigration ExpertEducator for GlasspaperNintex Virtual Technical Evangelist

[email protected]

http://www.sharepointblog.no @shareptkarm +47 982 24 609

Page 3: Get your SharePoint spinning with SQL Server

MS SQL Server is like the brain of your SharePoint environment

Page 4: Get your SharePoint spinning with SQL Server

So if the brain works slow, everything else will be slow….

Page 5: Get your SharePoint spinning with SQL Server

• 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

Page 6: Get your SharePoint spinning with SQL Server

Tip 1

Page 7: Get your SharePoint spinning with SQL Server

• 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

Page 8: Get your SharePoint spinning with SQL Server

Tip 2

Page 9: Get your SharePoint spinning with SQL Server

• 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

Page 10: Get your SharePoint spinning with SQL Server

• 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

Page 11: Get your SharePoint spinning with SQL Server

Tip 3

Page 12: Get your SharePoint spinning with SQL Server

• 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

Page 13: Get your SharePoint spinning with SQL Server

Tip 4

Page 14: Get your SharePoint spinning with SQL Server

• 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

Page 15: Get your SharePoint spinning with SQL Server

Tip 5

Page 16: Get your SharePoint spinning with SQL Server

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.

Page 17: Get your SharePoint spinning with SQL Server

Tip 6

Page 18: Get your SharePoint spinning with SQL Server

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:

Page 19: Get your SharePoint spinning with SQL Server

Tip 7

Page 20: Get your SharePoint spinning with SQL Server

Optimize TempdB

• Split across n locations• N = total number of physical cores > super myth

• 25% of largest content dB• The fastest disk possible

Page 21: Get your SharePoint spinning with SQL Server

Tip 8

Page 22: Get your SharePoint spinning with SQL Server

Default fill factor to 80

“SharePoint, a server wide setting of 80 is optimal to support growth and minimize fragmentation.”

Page 23: Get your SharePoint spinning with SQL Server

Tip 9

Page 24: Get your SharePoint spinning with SQL Server

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.

Page 25: Get your SharePoint spinning with SQL Server

Script

Page 26: Get your SharePoint spinning with SQL Server

Tip 10

Page 27: Get your SharePoint spinning with SQL Server

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

Page 28: Get your SharePoint spinning with SQL Server

Tip 11

Page 29: Get your SharePoint spinning with SQL Server

USE “DBA” created databases

• Sizing• Autogrowth• DO NOT USE SIMPLE RECOVERY• Unless you understand the implications

Page 30: Get your SharePoint spinning with SQL Server

Tip 12

Page 31: Get your SharePoint spinning with SQL Server

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

Page 32: Get your SharePoint spinning with SQL Server

Tip 13

Page 33: Get your SharePoint spinning with SQL Server

Script your SQL Server installation

• https://sqlserverfinebuild.codeplex.com/

Page 34: Get your SharePoint spinning with SQL Server

Tip 14

Page 35: Get your SharePoint spinning with SQL Server

Always install SQL Alias in SharePoint

Page 36: Get your SharePoint spinning with SQL Server

Summary

Page 37: Get your SharePoint spinning with SQL Server

10 simple tips to maximize performance

http://www.sharepointblog.no/?p=851. SSD Disk or better2. Formating disk with 64K3. Language corralation Latin_CI_AS_KS_WS4. Maximum memory5. Changed Sizes on Model database6. Default fill factor to 807. Switched of autocreate statistics8. 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

Page 38: Get your SharePoint spinning with SQL Server

@shareptkarmOffice 365

Questions?

Page 39: Get your SharePoint spinning with SQL Server

Thank You!Knut Relbe-MoeChief Technical [email protected]@outlook.com


Recommended