Download presentation
Presentation is loading. Please wait.
Published byJustin Hamilton Modified over 6 years ago
1
Rendre son SharePoint 2013/2016 extrêmement rapide en monitorant & optimisant SQL Server
Serge Luca & Isabelle Van Campenhoudt ShareQL
3
Isabelle Van Campenhoudt
SQL Server MVP, Brussels Consultant, speaker, trainer, PASS V-Chapter Leader Managing partner de SQL Server since 1999 Isabelle Van Campenhoudt Blog: TODO GUSS @thesqlgrrrl Isabelle Van Campenhoudt globalfrench.sqlpass.org
4
Serge Luca Serge Luca 10 x SharePoint MVP, Brussels
Consultant, speaker, trainer Managing partner of Serge Luca SharePoint since 2001 Blog: Serge Luca @SergeLuca
5
Isabelle Van Campenhoudt SQL guru
Credits Serge Luca Accidental DBA Isabelle Van Campenhoudt SQL guru
6
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
7
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
8
99.9% 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 has several databases; >20 if spousal installation
9
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
10
Optimize Hardware CPU RAM DISK Network
11
Network, latency Latency between web front ends and SQL Server
Office 365 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) © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
NTFS Allocation Unit Size
Office 365 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 Sql server reads 64k blocks (8x8 pages) © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
IOPS As part of capacity plan Determine how much GB you need
Talk to the SAN team Because…
14
Database name IOPS requirements Typical load on I/O subsystem. Optimization TempDB High 2 IOPS/GB Write Content DB IOPS/ GB (4 TB supported: 0.25IOPS/GB , ideally: 2 IOPS/GB) Read Transaction Log Search Crawl database Medium to high IOPS 10 IOPS per 1 document per second (DPS) crawl rate. Search Link database Medium IOPS 10 IOPS per 1 million items in the search index. Search administration database Low IOPS Not applicable. Search Analytics reporting database
15
How can you check if you SAN support these IOPS ?
IOMeter (free) SQLIO (free) … In production : be careful Test with a file > than SAN cache Test reading/writing , random 64k (for data)and sequential (for transaction log)
16
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
17
SQL Server configuration
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 Don’t install SSMS on the SQL Server computer Use a dedicated instance Run the service with a Managed account No specific permission Use named instances \ SharePoint
18
Collation settings Latin1_General_CI_AS_KS_WS (for SharePoint databases) (Any CI collation is supported for tempDBs, master, but Latin1_xxx_ is recommended) SP uses this collation when it creates its own db Cannot be changed after the setup !!!
19
Max degree of parallelism
Maxdop=1
20
Memory Limits Specify memory limits
21
Backups compression Backups Compression
22
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
23
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
24
SQL Server basic concepts
System databases Master : similar to the SP configDB Model : template for other dbs Msdb : for automation Tempdb : temporarily results User databases The SharePoint databases
25
Simple Recovery Model .LDF .MDF Content Database instructions Add
Office 365 Simple Recovery Model Content Database .LDF .MDF instructions Add Content Checkpoint instructions 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 Simple Recovery Model © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
26
Full Recovery Model (Recommended)
Office 365 Full Recovery Model Data Files and Log files should be on different drives (and not the System drive) Content Database .LDF .MDF Data instructions Add Content Checkpoint Same as single: but LDF is not cleaned-up; only during log backups (but the size remains the same) instructions Data Full Recovery Model (Recommended) © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
27
Model db : recovery model = full Tempdb : recovery model = simple
SharePoint DB : recovery model ? Contend DB = full Config DB= simple Services App DBs= it depends : Always On Availability groups: recovery = full ! (UAT & Production) Developer Workstation /Test Farm: recovery = simple!
28
Model DB settings Increase Autogrowth (MB , not %)
Increase Initial size Increase Autogrowth (MB , not %) Don’t modify Model db collation Full Recovery Model
29
At Least 10% of Biggest Content DB’s Size
TempDB settings Configure Tempdb files #files = #cores (on sql server 2012 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
31
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
32
Installing SharePoint
Setup account (sp-install) Must be: (SQL Server) DBcreator (SQL Server) Securityadmin Local admin Domain account
33
Integrating SharePoint and SQL Server
Farm has several databases; >20 if spousal installation 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
34
SP Health Analyzer Job will defragment the indices
If fragment > 30% & rowcount > Job will update statistics AUTO_CREATE_STATISTICS OFF
35
Verify Integrity of databases
DBCC CheckDB Check REPAIR_REBUILD Option to Fix Errors (Not Always Possible) REPAIR_ALLOW_DATA_LOSS Not Supported For Very Large DBs consider using option MAXDOP=1 Time Consuming Operation, Run During Non-Peak Hours
36
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
37
Use this trace as a baseline!!!
Tools Run a trace of Performance Counters (24 hours) CPU I/O (Iometer is a tool to check your SAN) Network Memory In production (live) Or Use Visual Studio (for Web performance Tests, simulate actions, number of users) Use PAL (free) (« Performance Analysis of Logs ») or SCOM Provides templates of accurate counters Analyse regarding thresholds Generate meaningfull reports Use this trace as a baseline!!!
38
Main counters Counters: Should be: Memory: Available Bytes
At least 4 GB for the system Logical Disk: Disk Reads/sec Between 15 and 25 ms Logical Disk: Disk Writes/sec Process: cpu/working set/io SQLsrve.exe % other processes Processor Max 40% SQL Server: Buffer Manager: Buffer Cache Hit Ratio >97% SQLServer: Buffer Manager: Page life expectancy > 300 sec (but do a baseline) 38
39
Dashboard
40
Check performance counters & set a baseline
41
Check performance counters & set a baseline
42
In-SAN-ity ?
43
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
44
Agenda Basic SharePoint DB concepts Operating System settings
SQL Server configuration Databases configuration SharePoint and SQL Server integration concepts SQL Server optimization HA and DR : Always On Availability Groups & SP 2013
45
Always On Availability Groups & SharePoint
High Availabilty Production Lisbon FARM 1 Synchronous SQL 1 SQL 2
46
Always On Availability Groups & SharePoint
High Availabilty Production Lisbon FARM 1 Synchronous SQL 1 SQL 2
47
Database Support – Sync Commit
Supported Admin Content Yes App Management BDC Config Content Managed Metadata PerformancePoint PowerPivot Not Tested Project Search Analytic Reporting Search Admin Database Supported Search Crawl Yes Search Links Secure Store State Service Subscription Settings Translation Services UPA Profile UPA Social UPA Sync Usage(=loggingDB) Yes – NR Word Automation
48
Disaster Recovery Synchronous Asynchronous Production DR FARM 1 FARM 2
Lisbon DR Porto FARM 1 FARM 2 Synchronous Asynchronous SQL 1 SQL 2 SQL 3 Disaster Recovery
49
Database Support – Async Commit
Supported Admin Content No App Management Yes BDC Config Content Managed Metadata PerformancePoint PowerPivot Not Tested* Project Search Analytic Reporting Search Admin Database Supported Search Crawl No Search Links Secure Store Yes State Service Subscription Settings Translation Services UPA Profile UPA Social UPA Sync Usage Yes – NR Word Automation
51
@thesqlgrrrl @sergeluca
Merci ! @thesqlgrrrl @sergeluca
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.