SlideShare une entreprise Scribd logo
1  sur  48
Make your SharePoint Fly
by Tuning & Optimizing SQL Server
Serge Luca, Isabelle Van Campenhoudt
ShareQL, Belgium
Add
Speaker
Photo here
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
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
Credits
Serge Luca
Accidental DBA
Isabelle
Van Campenhoudt
SQL guru
Agenda
Agenda
Explain Basic Concepts
Plan for long term
performance
Optimal Configuration
Maintenance
Measure & Improve
Conclusions
Explain
Plan
Configure
Maintain
Measure
Basic Concepts
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
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
.MDFCheckpoint.LDF
Data
Data
Simple Recovery Model
Add
Content
Content Database
instructions
instructions
Explain
.MDFCheckpoint.LDF
Data
Data
Full Recovery Model
Add
Content
Content Database
instructions
instructions
Explain
Plan for long term
performances
Optimize Resources
CPU RAM DISK Network
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
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 !!!
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
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
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.
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)
Installation & Configuration
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
Collation settings
Latin1_General_CI_AS_KS_WS
for SharePoint databases
Any CI collation is supported
for tempDBs, master
Latin1_xxx_ is recommended
SP uses this collation when it
creates its own db
Cannot be changed after the
setup !!!
Server Properties
Max degree of
parallelism
Maxdop=1
Memory Limits
Specify memory limits
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
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!
Model DB settings is the template
Increase Initial size Increase Autogrowth
(MB , not %)
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
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
Installing SharePoint
Setup account
(sp-install)
Must be:
(SQL Server)
DBcreator
(SQL Server)
Securityadmin
Local admin (SP
Machines only) Domain account
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
Maintenance
SharePoint: Health Analyzer
Job will defragment the indices
If fragment > 30% &
rowcount > 10.000
Job will update statistics
AUTO_CREATE_
STATISTICS OFF
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
Tools & Troubleshooting
Measuring is the key
Measure the
compliance
Measure the
performance
Measure the compliance
SQL
configuration
Disks
placements
Databases
configuration
Correct
maintenance
SPDOCKIT
SYSKIT
SQL Policies
& Custom Reporting
KANKURU
Microsoft BPA
Custom PowerShell
DBA Tools
Extended Properties
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
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)
Performances interpretation (source : PAL)
Stress your system to not have it stress you
A Dashboard is useful
TIP:
I use SQL Diagnostic
Queries queries in
Power BI
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
Conclusions
Conclusions
Explain
Plan
Configure
Maintain
Measure
Build strong relations with:
 DBA
 SAN
 Network
 Monitoring Team
Useful links
• http://www.iometer.org/
• https://dbatools.io/
• http://kankuru.com/
• https://pal.codeplex.com/
• https://www.sqlskills.com/blogs/glenn/sql-server-
diagnostic-information-queries-for-november-2017/
• https://www.spdockit.com/
• https://www.syskit.com/
Merci !
• @thesqlgrrrl @sergeluca

Contenu connexe

Tendances

Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye ZhouMetrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
Databricks
 

Tendances (20)

Powering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon RedshiftPowering Interactive Data Analysis at Pinterest by Amazon Redshift
Powering Interactive Data Analysis at Pinterest by Amazon Redshift
 
Data Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMRData Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMR
 
Fine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsFine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark Jobs
 
Mapping Data Flows Perf Tuning April 2021
Mapping Data Flows Perf Tuning April 2021Mapping Data Flows Perf Tuning April 2021
Mapping Data Flows Perf Tuning April 2021
 
Accelerating Data Processing in Spark SQL with Pandas UDFs
Accelerating Data Processing in Spark SQL with Pandas UDFsAccelerating Data Processing in Spark SQL with Pandas UDFs
Accelerating Data Processing in Spark SQL with Pandas UDFs
 
Data Replication Options in AWS (ARC302) | AWS re:Invent 2013
Data Replication Options in AWS (ARC302) | AWS re:Invent 2013Data Replication Options in AWS (ARC302) | AWS re:Invent 2013
Data Replication Options in AWS (ARC302) | AWS re:Invent 2013
 
Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye ZhouMetrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
Metrics-Driven Tuning of Apache Spark at Scale with Edwina Lu and Ye Zhou
 
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
 
(BDT305) Amazon EMR Deep Dive and Best Practices
(BDT305) Amazon EMR Deep Dive and Best Practices(BDT305) Amazon EMR Deep Dive and Best Practices
(BDT305) Amazon EMR Deep Dive and Best Practices
 
Introduction to Database Services
Introduction to Database ServicesIntroduction to Database Services
Introduction to Database Services
 
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
 
Intro to AWS: Database Services
Intro to AWS: Database ServicesIntro to AWS: Database Services
Intro to AWS: Database Services
 
Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
 
PostgreSQL
PostgreSQL PostgreSQL
PostgreSQL
 
Data science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel AvivData science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel Aviv
 
Uses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon RedshiftUses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon Redshift
 
Amazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetup
 
AWS Webcast - Redshift Overview and New Features
AWS Webcast - Redshift Overview and New Features AWS Webcast - Redshift Overview and New Features
AWS Webcast - Redshift Overview and New Features
 
Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDBDeep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB
 
Intro to AWS: Database Services
Intro to AWS: Database ServicesIntro to AWS: Database Services
Intro to AWS: Database Services
 

Similaire à Espc17 make your share point fly by tuning and optimising sql server

What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePoint
J.D. Wade
 
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Tuning Sql Server for SharePoint--- Community Day Belgium 2013Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Isabelle Van Campenhoudt
 
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Michael Noel
 

Similaire à Espc17 make your share point fly by tuning and optimising sql server (20)

Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
Sql Server Tuning for SharePoint : what every consultant must know (Office 36...
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...Tuning SQL Server for Sharepoint 2013-  What every sharepoint consultant need...
Tuning SQL Server for Sharepoint 2013- What every sharepoint consultant need...
 
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
 
SharePoint Performance
SharePoint PerformanceSharePoint Performance
SharePoint Performance
 
What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePoint
 
Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013Optimizing SQL Server 2012 for SharePoint 2013
Optimizing SQL Server 2012 for SharePoint 2013
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenance
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
SPS Kansas City: What SharePoint Admin need to know about SQL
SPS Kansas City: What SharePoint Admin need to know about SQLSPS Kansas City: What SharePoint Admin need to know about SQL
SPS Kansas City: What SharePoint Admin need to know about SQL
 
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Tuning Sql Server for SharePoint--- Community Day Belgium 2013Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
 
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
 
Datapolis Guest Expert Presentation: Top 15 SharePoint Server Configuration M...
Datapolis Guest Expert Presentation: Top 15 SharePoint Server Configuration M...Datapolis Guest Expert Presentation: Top 15 SharePoint Server Configuration M...
Datapolis Guest Expert Presentation: Top 15 SharePoint Server Configuration M...
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
 
(ISM303) Migrating Your Enterprise Data Warehouse To Amazon Redshift
(ISM303) Migrating Your Enterprise Data Warehouse To Amazon Redshift(ISM303) Migrating Your Enterprise Data Warehouse To Amazon Redshift
(ISM303) Migrating Your Enterprise Data Warehouse To Amazon Redshift
 
Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
 

Plus de Isabelle Van Campenhoudt

haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
Isabelle Van Campenhoudt
 

Plus de Isabelle Van Campenhoudt (14)

From Excel hero to Power BI champion
From Excel hero to Power BI championFrom Excel hero to Power BI champion
From Excel hero to Power BI champion
 
Excel patterns in Power BI: From Excel hero to Power BI Champion
Excel patterns in Power BI: From Excel hero to Power BI ChampionExcel patterns in Power BI: From Excel hero to Power BI Champion
Excel patterns in Power BI: From Excel hero to Power BI Champion
 
Power BI Report Server & Office Online Server
Power BI Report Server & Office Online ServerPower BI Report Server & Office Online Server
Power BI Report Server & Office Online Server
 
Retour d'expérience Power BI
Retour d'expérience Power BIRetour d'expérience Power BI
Retour d'expérience Power BI
 
Azure Data Factory-Rebuild 2017
Azure Data Factory-Rebuild 2017 Azure Data Factory-Rebuild 2017
Azure Data Factory-Rebuild 2017
 
Power Bi, le tour complet 2017
Power Bi, le tour complet 2017 Power Bi, le tour complet 2017
Power Bi, le tour complet 2017
 
SQL azure database for DBA
SQL azure database for DBASQL azure database for DBA
SQL azure database for DBA
 
Unbreakable Sharepoint 2016 With SQL Server 2016 availability groups
Unbreakable Sharepoint 2016 With SQL Server 2016 availability groupsUnbreakable Sharepoint 2016 With SQL Server 2016 availability groups
Unbreakable Sharepoint 2016 With SQL Server 2016 availability groups
 
Ms Cloud Summit 2017 - Power Bi, le tour complet 2017
Ms Cloud Summit 2017 - Power Bi, le tour complet 2017Ms Cloud Summit 2017 - Power Bi, le tour complet 2017
Ms Cloud Summit 2017 - Power Bi, le tour complet 2017
 
SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...SQL 2016 Query Store: Et si mes queries m'étaient contées...
SQL 2016 Query Store: Et si mes queries m'étaient contées...
 
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
 
Dat202 Techdays Paris 2015: PowerBI un an après
Dat202 Techdays Paris 2015: PowerBI un an aprèsDat202 Techdays Paris 2015: PowerBI un an après
Dat202 Techdays Paris 2015: PowerBI un an après
 
Powerbi 365
Powerbi 365Powerbi 365
Powerbi 365
 
Cycle Power BI Part1
Cycle Power BI Part1Cycle Power BI Part1
Cycle Power BI Part1
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
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
  • 12. .MDFCheckpoint.LDF Data Data Full Recovery Model Add Content Content Database instructions instructions Explain
  • 13. Plan for long term performances
  • 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
  • 23. Collation settings Latin1_General_CI_AS_KS_WS for SharePoint databases Any CI collation is supported for tempDBs, master Latin1_xxx_ is recommended SP uses this collation when it creates its own db Cannot be changed after the setup !!!
  • 24. Server Properties Max degree of parallelism Maxdop=1
  • 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
  • 31. Installing SharePoint Setup account (sp-install) Must be: (SQL Server) DBcreator (SQL Server) Securityadmin Local admin (SP Machines only) Domain account
  • 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
  • 37. Measuring is the key Measure the compliance Measure the performance
  • 38. Measure the compliance SQL configuration Disks placements Databases configuration Correct maintenance SPDOCKIT SYSKIT SQL Policies & Custom Reporting KANKURU Microsoft BPA Custom PowerShell DBA Tools Extended Properties
  • 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)
  • 42. Stress your system to not have it stress you
  • 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
  • 46. Conclusions Explain Plan Configure Maintain Measure Build strong relations with:  DBA  SAN  Network  Monitoring Team
  • 47. Useful links • http://www.iometer.org/ • https://dbatools.io/ • http://kankuru.com/ • https://pal.codeplex.com/ • https://www.sqlskills.com/blogs/glenn/sql-server- diagnostic-information-queries-for-november-2017/ • https://www.spdockit.com/ • https://www.syskit.com/

Notes de l'éditeur

  1. This is the Pre-Title Screen. Please do not place any content on this screen.
  2. 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
  3. TODO GUSS
  4. 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)
  5. 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
  6. 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
  7. Sql server reads 64k blocks (8x8 pages)
  8. https://sergeluca.wordpress.com/2014/01/21/stretched-farms-and-sharepoint-2013/