SQL Server is really the brain of SharePoint. The default settings of SQL server are not optimised for SharePoint. In this session, Serge Luca (SharePoint MVP) and Isabelle Van Campenhoudt (SQL Server MVP) will give you an overview of what every SQL Server DBA needs to know regarding configuring, monitoring and setting up SQL Server for SharePoint 2013. After a quick description of the SharePoint architecture (site, site collections,…), we will describe the different types of SharePoint databases and their specific configuration settings. Some do’s and don’ts specific to SharePoint and also the disaster recovery options for SharePoint, including (but not only) SQL Server Always On Availability, groups for High availability and disaster recovery in order to achieve an optimal level of business continuity.
Benefits of Attending this Session:
Tips & tricks
Lessons learned from the field
Super return on Investment
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Espc17 make your share point fly by tuning and optimising sql server
1.
2. Make your SharePoint Fly
by Tuning & Optimizing SQL Server
Serge Luca, Isabelle Van Campenhoudt
ShareQL, Belgium
Add
Speaker
Photo here
3. Serge Luca
Serge Luca
11 x SharePoint MVP, Brussels
Consultant, speaker, trainer
Managing partner of www.ShareQL.com
SharePoint since 2001
Blog: http://sergeluca.wordpress.com/
sergeluca@ShareQL.com
@SergeLuca
Serge Luca
4. Isabelle Van Campenhoudt
Isabelle Van
Campenhoud
t
SQL Server MVP, Brussels
Consultant, speaker, trainer, PASS V-Chapter Leader
Managing partner de www.ShareQL.com
SQL Server since 1999
Blog: http://thesqlgrrrl.wordpress.com/
ivc@ShareQL.com
@thesqlgrrrl
Isabelle
Van Campenhoudt
globalfrench.sqlpass.org
7. Agenda
Explain Basic Concepts
Plan for long term
performance
Optimal Configuration
Maintenance
Measure & Improve
Conclusions
Explain
Plan
Configure
Maintain
Measure
9. SharePoint databases
100% of SharePoint content
stored in SQL Server
Farm Configuration information
stored in configuration db
Central Administration content
stored in own content db
Most Service Applications have
at least one db
All Web Applications have at
least one content db
Farm can have many
databases : >20
Explain
Source : Brian Alderman, modified
10. SQL Server basic concepts
System
databases
Master : similar to
the SP configDB
Model : template
for other dbs
Tempdb :
temporarily results
Msdb : for
automation
User databases The SharePoint databases
Explain
Source : Brian Alderman,
modified
15. Quick Win : NTFS Allocation Unit Size
64K is optimal, 4K =
30% Performance
Penalty (data files, not
log files)
Use chkdsk <drive>to
Verify
Use Format to Configure:
• Format <drive> /Q /FS:NTFS /A:64K /V:<volume> /Y
16. Must Win: Network latency
Network (dedicated
subnet for SQL)
Latency between web
front ends and SQL
Server
• Mandatory for stretched farm, but good practice:
• < 1 ms during10 minutes (1% failure max)
• 1 Giga bits / sec
• Recommended if mirroring or Always On Sync (see later)
Use Alex
Strachan
PowerShell
scripts !!!
17. Disks: Volume but also IOPS
Because they need to know…
As part of capacity
plan
Determine how many
GB you need
->Talk to the DBA &
Capacity Manager
Determine how much
IOPS you need
->Talk to the SAN
team
18. Content DB volume & Site Collections
Site Collections only
reside in one database
Content database
contains multiple site
collections (2,000
Default Setting)
If Site Collection >
100GB store in own
content database
•Soft limit maximum size
<= 200 GB
19. Databases consume disk throughput
Database files IOPS requirements Typical load on I/O subsystem. Optimization
TempDB High 2 IOPS/GB Write
Transaction Log High 2 IOPS/GB Write
Content DB High
0.5-0.75 IOPS/GB
4 TB supported: 0.25 IOPS/GB ,
ideally: 2 IOPS/GB
Read
Search Crawl database Medium to high
10 IOPS per 1 document per second
(DPS) crawl rate.
Write
Search Link database Medium
10 IOPS per 1 million items in the search
index.
Search Analytics
reporting database Medium Not applicable.
Search administration
database
Low Not applicable.
20. How can you check if you SAN support these IOPS ?
• IOMeter (free)
• SQLIO (free)
• Discuss with SAN team …
• In production: resource intensive
• Test with a file > than SAN cache
• Test reading/writing , random 64k (for data)and sequential (for
transaction log)
22. Installing SQL Server
For SharePoint 2013:
• SQL Server 2008 R2 SP1
• SQL Server 2012 (SP1 for BI)
• SQL Server 2014 (SP2013 SP1 & April CU)
For SharePoint 2016:
• SQL Server 2014
• SQL Server 2016
• SQL Server 2017 (Win)
Don’t install SSMS on the SQL
Server computer
Use named instances
SharePoint
Use a dedicated instance
Run the service with a
Managed account
No specific permission,
Use SQL configuration
manager ---IFI
26. Tips
Use alias for the connection string
• Client alias or DNS alias (preferred)
Good practice : every SP Content db must be
created (and documented) by a DBA after a strict
capacity plan
27. Recovery – related to your RPO & Backups
Model db : recovery
model = template
Tempdb : recovery
model = simple
SharePoint DB :
recovery model ?
Contend DB = full
Config DB= simple
Services App DBs= it
depends :
• http://technet.microsoft.com
/en-
us/library/cc678868.aspx
UAT & Production
Always On Availability groups: recovery = full !
Developer Workstation /Test Farm:
recovery = simple!
28. Model DB settings is the template
Increase Initial size Increase Autogrowth
(MB , not %)
29. TempDB settings : crucial
Configure Tempdb files
#files = #cores
Max 8 if #cores > 8
Same size for every file
Configure Tempdb Size
At Least 10% of Biggest
Content DB’s Size
Tempdb Database Settings
Increase Initial Size Setting
Increase Autogrowth Settings (Use MB Not %)
Use Simple Recovery Model
Place on Different Drive Than Content Databases
30. Files placement
Priority (Fastest to Slowest Drive)
Tempdb Data and Transaction Log
Files
Content DataBase Transaction Log
Files
Search Database Data Files
Content Database Data Files
Use Multiple Data Files for Content
and Search DB’s
Distribute Equally-Sized Data Files Across
Separate Disks
Number of Data Files Should Be <=
Number of Processor Cores
32. Using SQL Server Resource Governor to optimize
Search Database usage
Part of SQL Server Enterprise
(since SQL 2008)
Limits CPU and memory usage on
some DBs (and IO in SQL Server
2014)
• like search DBs
Allow less CPU & mem & IO
usage during work hours
Allow more CPU & mem & IO
usage during off hours
34. SharePoint: Health Analyzer
Job will defragment the indices
If fragment > 30% &
rowcount > 10.000
Job will update statistics
AUTO_CREATE_
STATISTICS OFF
35. DBA: Verify Integrity of databases
DBCC CheckDB
Check REPAIR_REBUILD
Option to Fix Errors (Not
Always Possible)
REPAIR_ALLOW_DATA
_LOSS Not Supported
Time & Resource
Consuming Operation,
Run During Non-Peak
Hours
For Very Large DBs
consider using option
MAXDOP=1
39. Measure the performance
CPU
I/O
Network
Memory
Run a trace of
Performance
Counters (24 hours)
Provides templates of accurate
counters
Analyse regarding thresholds
Generate meaningfull reports
Map Toolkit
Performance Analysis
of Logs (PAL)
SCOM
You need a Baseline
40. Principal SQL Counters to measure
Counters: Should be:
Memory: Available Bytes At least 4 GB for the system
Logical Disk: Disk sec/Read Between 15 and 25 ms
Logical Disk: Disk sec/Write Between 15 and 25 ms
Process: cpu/working set/io SQLsrve.exe % other processes
Processor Max 40%
SQL Server: Buffer Manager: Buffer Cache Hit
Ratio
>97%
SQL Server: Buffer Manager: Page life expectancy > 300 sec (but do a baseline)
43. A Dashboard is useful
TIP:
I use SQL Diagnostic
Queries queries in
Power BI
44. Monitor your System on a daily basis
• Continuous monitor
• Rely on SQL monitoring
• Less is More
• Stick to the basics
• Notifications
• Adapt
• Reactions
• Have a strong reaction chain
This is the Pre-Title Screen.
Please do not place any content on this screen.
To add your image, first delete the place holder image as shown in the white box.Then insert your picture and scale it to be bigger than the size of the white box shown.Finally, right click on your image and select ‘Send to back’ – your image should now be framed correctly.
Please add co-speaker image directly below, if applicable
TODO GUSS
Parle-ton encore de ha ? ---non
Ajouter une partie audit et monitoring en passant en revue le toolset:
Spdockit et Spsqlkit
Dbatools
Kankuru
Policies
Tatoos
SQLtreeo
Methodologie d'audit
Insister sur la maintenance
Insister sur le capacity planning
Prevoir un tableau synoptique avec les points d'attention les outils les gens qui (people tools process)
In ldf, insttructions are stored in the lDF, data are stored in memory, and during the checkpoints data are stored in the MDF : ldf are cleaned-up
In ldf, insttructions are stored in the lDF, data are stored in memory, and during the checkpoints data are stored in the MDF : ldf are cleaned-up