Joel Oleson Sr. Product Architect Quest Software http://www.sharepointjoel.com @joeloleson Contributions: Mike Watson, Todd Klindt
Audience Poll New to SharePoint? SQL Admins? SharePoint Admins? Large-scale Implementation (+1 TB) experience? How many SQL Admins are freaking out because of the number of SharePoint databases?
Session Objectives And Takeaways Session Objective(s):  Understand the SQL and storage factors that affect a large scale SharePoint deployment. SharePoint SQL and storage best practices. Takeaway:  Proper SQL and Storage design is critical to overall SharePoint health!
SharePoint Databases  Overview
SharePoint Containment Hierarchy
Understanding SharePoint Databases
Understanding Configuration DB
Understanding Content DB
Understanding SSP DB - Search
Understanding SSP DB
 
Why is SQL that important? SQL Health = SharePoint Health! Sub-optimal SQL perf will radiate to other components in the farm. Slow response from SQL Server will result in queued App requests. As the app slows down, so does SQL.
Database Disk I/O Demand Most Demand Medium  Demand Low  Demand * Except during backup and Indexing  + Except during Profile Import Temp Master Model Tlogs Search Config +SSP *Content..
Top Performance Killers Indexing/Crawling Backup (SQL & Tape) Profile Import Misc Timer Jobs – User Sync for large #s of Users Poor Storage Configuration STSADM Backup/Restore Large List Operations Heavy User Operation List Import/Write Network Inefficient Queries
 
Scaling SQL 2.5TB SCALE OUT   2.5TB 2.5TB
Scalling SQL - Out More SQL servers = More flexibility There aren’t really any physical barriers SharePoint won’t prevent you from placing 100 databases on 100 different SQL instances The real barriers are manageability and cost. More servers = more money More servers = more management $$ + > management = $$$$
Scaling SQL 2.5TB SCALE UP   2.5TB 2.5TB
Scaling SQL - Up Design is Paramount!  Consider the following: Overall SQL Throughput (transactions/sec) Disk throughput (IOPS) Network throughput (MB/sec) Disk backup throughput (MB/sec) Network based backup throughput (MB/sec) Length of maintenance windows (hours -> minutes) SharePoint upgrade throughput
SQL: Scale Out VS. Scale Up Scale Out Scale Up Advantages Better Performance Easier to Manage Better Flexibility Cheaper Disadvantages More Expensive System Design is Critical Harder to Manage Single Point of Failure
Walkthrough: Scale Up VS. Out How to design a 5TB SharePoint SQL  Deployment 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB
Consider the Organization Will the SharePoint SQL Servers be self managed? What experience does the team managing SQL have? Do they have: Monitoring? Standard Maintenance Procedures? Standard Maintenance Windows? Standard SQL Builds? What are the break/fix and standard SLA’s?
Scaling SQL – The Bottom Line Don’t scale SQL instances beyond comfort zones! Do measure system throughput – Know All of your bottlenecks! Scaling out is more flexible but scaling up is more cost effective. Find a balance between scaling up and out and stick to it. (1-5TB per instance for example)
 
Highly Available Deployment? Redundant Switches Redundant Web/Application Servers Active/Passive SQL w/ Redundant HBA’s Redundant SAN Fabric RAID 1 Storage Redundant Power Supplies
Mirroring Within a Farm SQL High Avail or High Protection (sync) mirroring replaces or augments clustering as the SQL HA solution. Farm components can span closely located datacenters* Must have LAN like connectivity (1Gbps) Must have less than 1ms in latency (2ms RTT) Can be Active/Active or Active/Passive Use DNS or Load Balancing to direct traffic between frontends.
Mirroring Within Farm
High Availability Between Farms Can use a variety of methods to ship content between farms/data centers Log shipping Mirroring Storage replication Longer distances supported*  The greater the latency the harder it is to replicate content. No way to keep configuration or search in sync.
High Availability Between Farms
The Two Basic HA/DR Scenarios Mirroring Within Farm  Pros: Great combo HA/DR solution Cheaper to implement Easier to manage Cons: Requires closely located datacenters Requires excellent network conditions Not flexible Content corruption is replicated immediately. Mirroring/Log ship Between Farms Pros: Allows long distance separation Can protect against logical corruption Very flexible! Cons: More expensive Harder to setup and manage Failover is a big decision
Combining Solutions
SQL 2008 - Do you have Enterprise?
 
Content DB Size Limitation 100GB? Exceeding 100GB? Keep in mind: Backup/restore/maintenance will be harder. Use differential backup. All sites share the same tables. Isolate large sites. Use multiple data files Defrag regularly.  * Your experience may vary: H/W and usage profile dependant.
Large Lists – 2000 Items? SharePoint supports large lists, but you must carefully plan how users view the lists to prevent performance impacts.  For  best performance , do not exceed 2,000 items per folder or view Define limits on views. Use indexed columns. Take it easy on column and field counts.
SQL Memory – 4GB Enough? “ 4 GB is the minimum required memory, 8 GB is recommended for medium size deployments, and 16 GB and above is recommended for large deployments. ” What influences the amount of RAM? Number and size of Content databases. Number of concurrent requests to SQL. Size and width of commonly used lists. Remember: Minimum is where we start…
SQL Data files  Best Practices: Allocate TempDB on RAID 1. (or R1 variants) Separate Data and Logs on different LUNS Spread databases on multiple spindles For TempDB, Create multiple data files up to the number of CPU cores. Pre-Grow files (Autogrow as safety net) SharePoint 2010 supports file groups for content databases!
Identifying Disk Bottlenecks Perfmon Monitor transfer/sec for throughput trends. Monitor Disk sec/Read / Disk sec/Write for bottlenecks. Monitor disk Queue length for bottlenecks . SQL Select * from sys.dm_IO_virtual_file_stats(null, null) Solution -http://www.sqlmag.com/Articles/ArticleID/96513/96513.html
 
Lots of New SharePoint 2010 Databases
Large List Throttling Configurable List Throttling And Thresholds You control when and how much! List throttling controls forces end users to create more efficient views with < x number of items.
Web Part Performance Dashboards
Best Practices Analyzer Health Rules Runs on a Timer Job Create your own! Repair Auto-magically!
Logs & Reporting to the DB Extensibility for reporting and possibilities are limitless
Summary SQL is extremely important to SharePoint health and Performance Put SQL on 64bit. (Required for SharePoint 2010) SQL 2008 Enterprise – Scale, HA, compliance security features Think IOPS when designing disk arrays. Always separate work loads with the following priority: temp, log, search, content. SQL scales up and out. Don’t push the limits upward, but keep manageability and costs in mind when scaling out. Designing enterprise services with great care. Separate SSP and Search when possible.  SharePoint 2010 brings more databases so strategically plan for 20-50 dbs min…
 
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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. Required Slide
 
Search Disk Performance  Reference: http://blogs.msdn.com/enterprisesearch/archive/2008/05/19/sql-monitoring-and-i-o.aspx Drive IOPs Read (max) IOPs Write (max) Ratio Read/ Write Latency Read (sec) Latency Write (sec) Search DB Logs 14.67  1,777.29  0.01  0.3060  0.8550  Temp DB 1,110.98  1,492.01  0.74  1.6870  3.5660  Query file group 3,507.26  1,631.96  2.15  3.4360  3.2140  Crawl file group 3,043.93  371.65  8.19  15.0840  15.8720
Applying the Newest Learnings Add more processor to the backend: 4 cores to 8 cores Add more RAM: 16GB to 32GB Run profile sync on our terms! Run the jobs as little as possible. Once a week or once a month. Separate SSP SQL instance from Search SQL instance.

Large Scale SQL Considerations for SharePoint Deployments

  • 1.
    Joel Oleson Sr.Product Architect Quest Software http://www.sharepointjoel.com @joeloleson Contributions: Mike Watson, Todd Klindt
  • 2.
    Audience Poll Newto SharePoint? SQL Admins? SharePoint Admins? Large-scale Implementation (+1 TB) experience? How many SQL Admins are freaking out because of the number of SharePoint databases?
  • 3.
    Session Objectives AndTakeaways Session Objective(s): Understand the SQL and storage factors that affect a large scale SharePoint deployment. SharePoint SQL and storage best practices. Takeaway: Proper SQL and Storage design is critical to overall SharePoint health!
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
    Why is SQLthat important? SQL Health = SharePoint Health! Sub-optimal SQL perf will radiate to other components in the farm. Slow response from SQL Server will result in queued App requests. As the app slows down, so does SQL.
  • 13.
    Database Disk I/ODemand Most Demand Medium Demand Low Demand * Except during backup and Indexing + Except during Profile Import Temp Master Model Tlogs Search Config +SSP *Content..
  • 14.
    Top Performance KillersIndexing/Crawling Backup (SQL & Tape) Profile Import Misc Timer Jobs – User Sync for large #s of Users Poor Storage Configuration STSADM Backup/Restore Large List Operations Heavy User Operation List Import/Write Network Inefficient Queries
  • 15.
  • 16.
    Scaling SQL 2.5TBSCALE OUT  2.5TB 2.5TB
  • 17.
    Scalling SQL -Out More SQL servers = More flexibility There aren’t really any physical barriers SharePoint won’t prevent you from placing 100 databases on 100 different SQL instances The real barriers are manageability and cost. More servers = more money More servers = more management $$ + > management = $$$$
  • 18.
    Scaling SQL 2.5TBSCALE UP  2.5TB 2.5TB
  • 19.
    Scaling SQL -Up Design is Paramount! Consider the following: Overall SQL Throughput (transactions/sec) Disk throughput (IOPS) Network throughput (MB/sec) Disk backup throughput (MB/sec) Network based backup throughput (MB/sec) Length of maintenance windows (hours -> minutes) SharePoint upgrade throughput
  • 20.
    SQL: Scale OutVS. Scale Up Scale Out Scale Up Advantages Better Performance Easier to Manage Better Flexibility Cheaper Disadvantages More Expensive System Design is Critical Harder to Manage Single Point of Failure
  • 21.
    Walkthrough: Scale UpVS. Out How to design a 5TB SharePoint SQL Deployment 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB 1TB
  • 22.
    Consider the OrganizationWill the SharePoint SQL Servers be self managed? What experience does the team managing SQL have? Do they have: Monitoring? Standard Maintenance Procedures? Standard Maintenance Windows? Standard SQL Builds? What are the break/fix and standard SLA’s?
  • 23.
    Scaling SQL –The Bottom Line Don’t scale SQL instances beyond comfort zones! Do measure system throughput – Know All of your bottlenecks! Scaling out is more flexible but scaling up is more cost effective. Find a balance between scaling up and out and stick to it. (1-5TB per instance for example)
  • 24.
  • 25.
    Highly Available Deployment?Redundant Switches Redundant Web/Application Servers Active/Passive SQL w/ Redundant HBA’s Redundant SAN Fabric RAID 1 Storage Redundant Power Supplies
  • 26.
    Mirroring Within aFarm SQL High Avail or High Protection (sync) mirroring replaces or augments clustering as the SQL HA solution. Farm components can span closely located datacenters* Must have LAN like connectivity (1Gbps) Must have less than 1ms in latency (2ms RTT) Can be Active/Active or Active/Passive Use DNS or Load Balancing to direct traffic between frontends.
  • 27.
  • 28.
    High Availability BetweenFarms Can use a variety of methods to ship content between farms/data centers Log shipping Mirroring Storage replication Longer distances supported* The greater the latency the harder it is to replicate content. No way to keep configuration or search in sync.
  • 29.
  • 30.
    The Two BasicHA/DR Scenarios Mirroring Within Farm Pros: Great combo HA/DR solution Cheaper to implement Easier to manage Cons: Requires closely located datacenters Requires excellent network conditions Not flexible Content corruption is replicated immediately. Mirroring/Log ship Between Farms Pros: Allows long distance separation Can protect against logical corruption Very flexible! Cons: More expensive Harder to setup and manage Failover is a big decision
  • 31.
  • 32.
    SQL 2008 -Do you have Enterprise?
  • 33.
  • 34.
    Content DB SizeLimitation 100GB? Exceeding 100GB? Keep in mind: Backup/restore/maintenance will be harder. Use differential backup. All sites share the same tables. Isolate large sites. Use multiple data files Defrag regularly. * Your experience may vary: H/W and usage profile dependant.
  • 35.
    Large Lists –2000 Items? SharePoint supports large lists, but you must carefully plan how users view the lists to prevent performance impacts. For best performance , do not exceed 2,000 items per folder or view Define limits on views. Use indexed columns. Take it easy on column and field counts.
  • 36.
    SQL Memory –4GB Enough? “ 4 GB is the minimum required memory, 8 GB is recommended for medium size deployments, and 16 GB and above is recommended for large deployments. ” What influences the amount of RAM? Number and size of Content databases. Number of concurrent requests to SQL. Size and width of commonly used lists. Remember: Minimum is where we start…
  • 37.
    SQL Data files Best Practices: Allocate TempDB on RAID 1. (or R1 variants) Separate Data and Logs on different LUNS Spread databases on multiple spindles For TempDB, Create multiple data files up to the number of CPU cores. Pre-Grow files (Autogrow as safety net) SharePoint 2010 supports file groups for content databases!
  • 38.
    Identifying Disk BottlenecksPerfmon Monitor transfer/sec for throughput trends. Monitor Disk sec/Read / Disk sec/Write for bottlenecks. Monitor disk Queue length for bottlenecks . SQL Select * from sys.dm_IO_virtual_file_stats(null, null) Solution -http://www.sqlmag.com/Articles/ArticleID/96513/96513.html
  • 39.
  • 40.
    Lots of NewSharePoint 2010 Databases
  • 41.
    Large List ThrottlingConfigurable List Throttling And Thresholds You control when and how much! List throttling controls forces end users to create more efficient views with < x number of items.
  • 42.
  • 43.
    Best Practices AnalyzerHealth Rules Runs on a Timer Job Create your own! Repair Auto-magically!
  • 44.
    Logs & Reportingto the DB Extensibility for reporting and possibilities are limitless
  • 45.
    Summary SQL isextremely important to SharePoint health and Performance Put SQL on 64bit. (Required for SharePoint 2010) SQL 2008 Enterprise – Scale, HA, compliance security features Think IOPS when designing disk arrays. Always separate work loads with the following priority: temp, log, search, content. SQL scales up and out. Don’t push the limits upward, but keep manageability and costs in mind when scaling out. Designing enterprise services with great care. Separate SSP and Search when possible. SharePoint 2010 brings more databases so strategically plan for 20-50 dbs min…
  • 46.
  • 47.
    © 2009 MicrosoftCorporation. All rights reserved. Microsoft, Windows, Windows Vista 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. Required Slide
  • 48.
  • 49.
    Search Disk Performance Reference: http://blogs.msdn.com/enterprisesearch/archive/2008/05/19/sql-monitoring-and-i-o.aspx Drive IOPs Read (max) IOPs Write (max) Ratio Read/ Write Latency Read (sec) Latency Write (sec) Search DB Logs 14.67 1,777.29 0.01 0.3060 0.8550 Temp DB 1,110.98 1,492.01 0.74 1.6870 3.5660 Query file group 3,507.26 1,631.96 2.15 3.4360 3.2140 Crawl file group 3,043.93 371.65 8.19 15.0840 15.8720
  • 50.
    Applying the NewestLearnings Add more processor to the backend: 4 cores to 8 cores Add more RAM: 16GB to 32GB Run profile sync on our terms! Run the jobs as little as possible. Once a week or once a month. Separate SSP SQL instance from Search SQL instance.