SlideShare a Scribd company logo
1 of 27
Optimizing SQL Server 2008
    For blazing fast SharePoint sites
Randy Williams
           • Enterprise Trainer & Evangelist
           • Based in San Diego, CA
           • SharePoint MVP alum (2009 – 2011)
           • Speaker at many global conferences
• 20+ years in IT
  ●   Developer, consultant, trainer, author
• Columnist: SharePoint Pro magazine
• randy.williams@avepoint.com
• @tweetraw
Agenda

•   Quick review of database basics
•   Optimize the server
•   Optimize tempdb
•   Optimize Content DBs
•   Scaling out
•   Best Practices
Quick Review of Database Basics

• Each database consists of
  ●    One or more data files (.mdf, .ndf)
  ●    One or more log files (.ldf)
• When changes occur
  1.       Log is written to first
  2.       Checkpoint process commits changes to
           data files
       •     In simple recovery inactive transaction in log is
             truncated
How SharePoint Uses SQL

• One configuration DB per farm
• Each web app has one or more content
  DBs
  ●   Container for site collections
  ●   All SharePoint content, including files, is
      stored in content DB
• Service application databases
  ●   Search databases are usually most important
      when optimizing
The Most Important Factors

1. RAM
2. CPU
3. Storage
  ●   SAN is best for performance (greatest IOPS)
  ●   Work with your storage vendor when configuring
      Logical Unit Numbers (LUNs)
4. Network
Optimize the DB Server

• Do not run non-SQL apps on SQL Server
• Dedicate SQL Server to one SharePoint
  Farm
• If virtualizing
  ●   Virtualize WFE and app servers first
  ●   SQL can be virtualized, but it will affect
      performance
Optimize the SQL Instance

• Adjust database default locations
  ●   Never place on C: drive
  ●   Log and data on separate LUNs/physical
      disks
• Adjust server memory settings if running
  multiple instances
• Use 64KB allocation units when formatting
  data and log partitions
Demo

OPTIMIZING SQL SERVER
Optimizing tempdb

• Pre-size – set to 25% of largest DB
• Use AutoGrow of ~100MB – if growing,
  increase initial size
• Use multiple data files of same size –
  latest guidance is ¼ - 1 per physical CPU
  ●   Each file on a separate LUN, if possible
  ●   Store log on its own LUN
• Use RAID 1+0
When working with a SharePoint DB

• Do not do any of following
  ●   Do not add, change or remove any built-in objects
      (tables, views, stored procedures, triggers, indexes)
  ●   Do not directly select from tables or views
  ●   Change the database collation

• Logging DB is the only exception
After creating a content DB

• Add multiple files of same size to primary
  file group
  ●   Ideally: count should equal # of cores per
      NUMA node (ask your hardware vendor if
      unsure)
• If DB is expected to grow large – pre-size
  the data files
  ●   Set autogrow between 50-100MB per file
• Preset log to about 25%
  ●   Set autogrow between 20-40MB
Optimizing content DBs
   • Very active content DBs should be placed
     on their own LUNs
   • Use RAID 5 or RAID 1+0
   • In most cases, keep size < 200GB
       ●   Why? Recovery and performance reasons
       ●   Use site collection quotas
       ●   Don’t forget about the 2nd stage recycle bin
       ●   Use PowerShell to create site collections -
           store in specific content DB
For more, see http://slidesha.re/t1xnxD
Why are larger DBs slower?

• Read queries take longer
  ●   More rows to filter, group and sort
• Write queries take longer
• Increased lock contention
  ●   Causes more blocking
• More data, but data cache same size
• DB maintenance takes longer
  ●   reindex
  ●   dbcc checkdb
Demo

SIZE AFFECTS PERFORMANCE
Book giveaway

• What is the recommended size when
  configuring tempdb?
Achieving storage performance

• Storage array (RAID 1+0)
  ●   10 300GB SAS drives, 15k RPM
  ●   1.5 TB effective space
  ●   ~1500 IOPS = 1.0 IOPS/GB
• Set of drives (RAID 1+0)
  ●   4 750GB SATA drives, 10k RPM
  ●   1.5 TB effective space
  ●   ~300 IOPS = 0.2 IOPS/GB
• Go with higher quality storage
  ●   SAS > SATA ; SAN > DAS
Scaling storage

• Multiple storage arrays (RAID 1+0)
• Break out into multiple LUNs
• Add additional data files to DB, one per
  array
                                F:SP_DocCenter_1.mdf
• Advice                        G: SP_DocCenter_2.ndf
                                                                 Data
   ●   Many smaller drives >           H: SP_DocCenter_3.ndf
                                        I: SP_DocCenter_4.ndf
       fewer larger ones
                                        J: SP_DocCenter.ldf     Log
   ●   RAID 1+0 > RAID 5
Optimizing Search DBs

• Max of 25 million items per each crawl and
  property DB
• Store crawl and property DBs on separate,
  dedicated LUNs
• Add data files to match Content DBs
• Use RAID 1+0 storage
• Consider storing on dedicated SQL server
Scaling out for performance

• For large, high-performance farms, scale
  out to multiple SQL servers
• No limit to the number of servers – each
  database can have its own
  ●   Best practice is to break out across some
      logical boundary (web app, service apps, etc.)
• Using clustered SQL servers?
  ●   Consider using instances and make each
      instance active on a separate physical node
Reindexing DBs

• Fragmentation happens by design –
  primary key uses GUID columns
• Indexes are rebuilt daily as part of health
  analyzer job
• No manual reindex needed
  ●   Do not drop and recreate indexes
RBS Guidance

  • Consider using in document-heavy databases
  • Trade off
       ●   Storage cost & performance benefits versus
       ●   More complex architecture (support, DR, HA)
  • Consider third party providers
       ●   More full-featured solutions
  • In general
       ●   Do not externalize documents <1MB
       ●   Ideal number varies widely
For more, see bit.ly/v4iMMm
Best Practices

• Use SQL 2008 R2 Enterprise for best performance
• Backup logs regularly to prevent runaway log files
• Do not use autoshrink
   ●   Shrink manually only when needed
• Do not use multiple file groups
   ●   Not supported by SharePoint
• Run database integrity checks
• Use Instant File Initialization
   ●   http://bit.ly/bRhdgH
Book giveaway

• What are the three primary types of
  databases that SharePoint uses?
Questions?
  randy.williams@avepoint.com
  http://linkd.in/plEEb1
  @tweetraw
Victory Lap- social event
  "SharePoint Victory Lap" Social Event for
     SPSLA will be at: 5:30pm to 8pm at
Di Piazzas (5205 E. Pacific Coast Hwy, 90804)
We want your feedback!
                   Use this QR code or visit:
                   http://sps.la/feedback

                   Silver Sponsors:

More Related Content

Viewers also liked

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...serge luca
 
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...Patrick Guimonet
 
Buenas prácticas en infraestructura en SharePoint 2013
Buenas prácticas en infraestructura en SharePoint 2013Buenas prácticas en infraestructura en SharePoint 2013
Buenas prácticas en infraestructura en SharePoint 2013Miguel Tabera
 
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...European SharePoint Conference
 
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016Lars Platzdasch
 
A Deep Dive into SharePoint 2016 architecture and deployment
A Deep Dive into SharePoint 2016 architecture and deploymentA Deep Dive into SharePoint 2016 architecture and deployment
A Deep Dive into SharePoint 2016 architecture and deploymentSPC Adriatics
 
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...Lars Platzdasch
 
SharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldSharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldJason Himmelstein
 
Sql best practices for SharePoint 2010
Sql best practices for SharePoint 2010Sql best practices for SharePoint 2010
Sql best practices for SharePoint 2010Samuel Zürcher
 

Viewers also liked (9)

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...
 
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...
SharePoint Saturday Netherlands 2016 - SharePoint and Office 365 performances...
 
Buenas prácticas en infraestructura en SharePoint 2013
Buenas prácticas en infraestructura en SharePoint 2013Buenas prácticas en infraestructura en SharePoint 2013
Buenas prácticas en infraestructura en SharePoint 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...
 
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
 
A Deep Dive into SharePoint 2016 architecture and deployment
A Deep Dive into SharePoint 2016 architecture and deploymentA Deep Dive into SharePoint 2016 architecture and deployment
A Deep Dive into SharePoint 2016 architecture and deployment
 
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
Optimizing SQL Server 2012 Deep dive for SharePoint 2013 Lars Platzdasch SQL ...
 
SharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the FieldSharePoint Performance: Best Practices from the Field
SharePoint Performance: Best Practices from the Field
 
Sql best practices for SharePoint 2010
Sql best practices for SharePoint 2010Sql best practices for SharePoint 2010
Sql best practices for SharePoint 2010
 

More from Randy Williams

Architecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessArchitecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessRandy Williams
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsRandy Williams
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Randy Williams
 
Governing and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsGoverning and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsRandy Williams
 
When governance lacks compliance
When governance lacks complianceWhen governance lacks compliance
When governance lacks complianceRandy Williams
 
The Future of Social Collaboration
The Future of Social CollaborationThe Future of Social Collaboration
The Future of Social CollaborationRandy Williams
 
Getting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsGetting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsRandy Williams
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps todayRandy Williams
 
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaSQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaRandy Williams
 
How governance drives your information and security architecture
How governance drives your information and security architectureHow governance drives your information and security architecture
How governance drives your information and security architectureRandy Williams
 
Sizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsSizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsRandy Williams
 
SharePoint Online and the Cloud
SharePoint Online and the CloudSharePoint Online and the Cloud
SharePoint Online and the CloudRandy Williams
 
Enforcing SharePoint Governance
Enforcing SharePoint GovernanceEnforcing SharePoint Governance
Enforcing SharePoint GovernanceRandy Williams
 
Migrating to Office 365
Migrating to Office 365Migrating to Office 365
Migrating to Office 365Randy Williams
 
Governance - how does information & security drive your architecture
Governance - how does information & security drive your architectureGovernance - how does information & security drive your architecture
Governance - how does information & security drive your architectureRandy Williams
 
Understanding SharePoint Governance
Understanding SharePoint GovernanceUnderstanding SharePoint Governance
Understanding SharePoint GovernanceRandy Williams
 
Guiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationGuiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationRandy Williams
 
Plugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyPlugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyRandy Williams
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web partsRandy Williams
 

More from Randy Williams (20)

Architecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to SuccessArchitecting Solutions and Systems – Randy’s Secrets to Success
Architecting Solutions and Systems – Randy’s Secrets to Success
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
 
Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013Integrating SharePoint with Exchange-2013
Integrating SharePoint with Exchange-2013
 
Governing and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environmentsGoverning and managing hybrid SharePoint environments
Governing and managing hybrid SharePoint environments
 
When governance lacks compliance
When governance lacks complianceWhen governance lacks compliance
When governance lacks compliance
 
The Future of Social Collaboration
The Future of Social CollaborationThe Future of Social Collaboration
The Future of Social Collaboration
 
Getting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 AppsGetting Started with SharePoint 2013 Apps
Getting Started with SharePoint 2013 Apps
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps today
 
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting NirvanaSQL Server 2012 and SharePoint 2010: Reporting Nirvana
SQL Server 2012 and SharePoint 2010: Reporting Nirvana
 
How governance drives your information and security architecture
How governance drives your information and security architectureHow governance drives your information and security architecture
How governance drives your information and security architecture
 
Sizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the LimitsSizing your Content Databases: Understanding the Limits
Sizing your Content Databases: Understanding the Limits
 
SharePoint Online and the Cloud
SharePoint Online and the CloudSharePoint Online and the Cloud
SharePoint Online and the Cloud
 
Enforcing SharePoint Governance
Enforcing SharePoint GovernanceEnforcing SharePoint Governance
Enforcing SharePoint Governance
 
Migrating to Office 365
Migrating to Office 365Migrating to Office 365
Migrating to Office 365
 
Governance - how does information & security drive your architecture
Governance - how does information & security drive your architectureGovernance - how does information & security drive your architecture
Governance - how does information & security drive your architecture
 
Understanding SharePoint Governance
Understanding SharePoint GovernanceUnderstanding SharePoint Governance
Understanding SharePoint Governance
 
Why I Use SharePoint
Why I Use SharePointWhy I Use SharePoint
Why I Use SharePoint
 
Guiding a Successful SharePoint Implementation
Guiding a Successful SharePoint ImplementationGuiding a Successful SharePoint Implementation
Guiding a Successful SharePoint Implementation
 
Plugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategyPlugging holes in your SharePoint 2010 disaster recovery strategy
Plugging holes in your SharePoint 2010 disaster recovery strategy
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web parts
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Optimizing SQL Server 2008 for Blazing Fast SharePoint Sites

  • 1. Optimizing SQL Server 2008 For blazing fast SharePoint sites
  • 2. Randy Williams • Enterprise Trainer & Evangelist • Based in San Diego, CA • SharePoint MVP alum (2009 – 2011) • Speaker at many global conferences • 20+ years in IT ● Developer, consultant, trainer, author • Columnist: SharePoint Pro magazine • randy.williams@avepoint.com • @tweetraw
  • 3. Agenda • Quick review of database basics • Optimize the server • Optimize tempdb • Optimize Content DBs • Scaling out • Best Practices
  • 4. Quick Review of Database Basics • Each database consists of ● One or more data files (.mdf, .ndf) ● One or more log files (.ldf) • When changes occur 1. Log is written to first 2. Checkpoint process commits changes to data files • In simple recovery inactive transaction in log is truncated
  • 5. How SharePoint Uses SQL • One configuration DB per farm • Each web app has one or more content DBs ● Container for site collections ● All SharePoint content, including files, is stored in content DB • Service application databases ● Search databases are usually most important when optimizing
  • 6. The Most Important Factors 1. RAM 2. CPU 3. Storage ● SAN is best for performance (greatest IOPS) ● Work with your storage vendor when configuring Logical Unit Numbers (LUNs) 4. Network
  • 7. Optimize the DB Server • Do not run non-SQL apps on SQL Server • Dedicate SQL Server to one SharePoint Farm • If virtualizing ● Virtualize WFE and app servers first ● SQL can be virtualized, but it will affect performance
  • 8. Optimize the SQL Instance • Adjust database default locations ● Never place on C: drive ● Log and data on separate LUNs/physical disks • Adjust server memory settings if running multiple instances • Use 64KB allocation units when formatting data and log partitions
  • 10. Optimizing tempdb • Pre-size – set to 25% of largest DB • Use AutoGrow of ~100MB – if growing, increase initial size • Use multiple data files of same size – latest guidance is ¼ - 1 per physical CPU ● Each file on a separate LUN, if possible ● Store log on its own LUN • Use RAID 1+0
  • 11. When working with a SharePoint DB • Do not do any of following ● Do not add, change or remove any built-in objects (tables, views, stored procedures, triggers, indexes) ● Do not directly select from tables or views ● Change the database collation • Logging DB is the only exception
  • 12. After creating a content DB • Add multiple files of same size to primary file group ● Ideally: count should equal # of cores per NUMA node (ask your hardware vendor if unsure) • If DB is expected to grow large – pre-size the data files ● Set autogrow between 50-100MB per file • Preset log to about 25% ● Set autogrow between 20-40MB
  • 13. Optimizing content DBs • Very active content DBs should be placed on their own LUNs • Use RAID 5 or RAID 1+0 • In most cases, keep size < 200GB ● Why? Recovery and performance reasons ● Use site collection quotas ● Don’t forget about the 2nd stage recycle bin ● Use PowerShell to create site collections - store in specific content DB For more, see http://slidesha.re/t1xnxD
  • 14. Why are larger DBs slower? • Read queries take longer ● More rows to filter, group and sort • Write queries take longer • Increased lock contention ● Causes more blocking • More data, but data cache same size • DB maintenance takes longer ● reindex ● dbcc checkdb
  • 16. Book giveaway • What is the recommended size when configuring tempdb?
  • 17. Achieving storage performance • Storage array (RAID 1+0) ● 10 300GB SAS drives, 15k RPM ● 1.5 TB effective space ● ~1500 IOPS = 1.0 IOPS/GB • Set of drives (RAID 1+0) ● 4 750GB SATA drives, 10k RPM ● 1.5 TB effective space ● ~300 IOPS = 0.2 IOPS/GB • Go with higher quality storage ● SAS > SATA ; SAN > DAS
  • 18. Scaling storage • Multiple storage arrays (RAID 1+0) • Break out into multiple LUNs • Add additional data files to DB, one per array F:SP_DocCenter_1.mdf • Advice G: SP_DocCenter_2.ndf Data ● Many smaller drives > H: SP_DocCenter_3.ndf I: SP_DocCenter_4.ndf fewer larger ones J: SP_DocCenter.ldf Log ● RAID 1+0 > RAID 5
  • 19. Optimizing Search DBs • Max of 25 million items per each crawl and property DB • Store crawl and property DBs on separate, dedicated LUNs • Add data files to match Content DBs • Use RAID 1+0 storage • Consider storing on dedicated SQL server
  • 20. Scaling out for performance • For large, high-performance farms, scale out to multiple SQL servers • No limit to the number of servers – each database can have its own ● Best practice is to break out across some logical boundary (web app, service apps, etc.) • Using clustered SQL servers? ● Consider using instances and make each instance active on a separate physical node
  • 21. Reindexing DBs • Fragmentation happens by design – primary key uses GUID columns • Indexes are rebuilt daily as part of health analyzer job • No manual reindex needed ● Do not drop and recreate indexes
  • 22. RBS Guidance • Consider using in document-heavy databases • Trade off ● Storage cost & performance benefits versus ● More complex architecture (support, DR, HA) • Consider third party providers ● More full-featured solutions • In general ● Do not externalize documents <1MB ● Ideal number varies widely For more, see bit.ly/v4iMMm
  • 23. Best Practices • Use SQL 2008 R2 Enterprise for best performance • Backup logs regularly to prevent runaway log files • Do not use autoshrink ● Shrink manually only when needed • Do not use multiple file groups ● Not supported by SharePoint • Run database integrity checks • Use Instant File Initialization ● http://bit.ly/bRhdgH
  • 24. Book giveaway • What are the three primary types of databases that SharePoint uses?
  • 25. Questions? randy.williams@avepoint.com http://linkd.in/plEEb1 @tweetraw
  • 26. Victory Lap- social event "SharePoint Victory Lap" Social Event for SPSLA will be at: 5:30pm to 8pm at Di Piazzas (5205 E. Pacific Coast Hwy, 90804)
  • 27. We want your feedback! Use this QR code or visit: http://sps.la/feedback Silver Sponsors:

Editor's Notes

  1. v4iMMm