Upload
joel-oleson
View
116
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Large Scale SQL Considerations for SharePoint: Considerations for performance, scale, storage, and high availability
Citation preview
Joel OlesonSr. Product ArchitectQuest Softwarehttp://www.sharepointjoel.com@joeloleson
Contributions: Mike Watson, Todd Klindt
Audience PollNew 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
SearchSearch
Most Demand
ConfigConfig
Medium Demand
+SSP+SSP
*Content..*Content..
Low Demand
* Except during backup and Indexing + Except during Profile Import
TempTemp
MasterMaster
ModelModel
TlogsTlogs
Top Performance Killers1. Indexing/Crawling2. Backup (SQL & Tape)3. Profile Import4. Misc Timer Jobs – User Sync for large #s of Users5. Poor Storage Configuration6. STSADM Backup/Restore7. Large List Operations8. Heavy User Operation List Import/Write9. Network10. Inefficient Queries
Scaling SQL
2.5TB 2.5TB 2.5TB
SCALE OUT
Scalling SQL - Out
More SQL servers = More flexibilityThere aren’t really any physical barriersSharePoint won’t prevent you from placing 100 databases on 100 different SQL instancesThe real barriers are manageability and cost.
More servers = more moneyMore servers = more management$$ + > management = $$$$
Scaling SQL
2.5TB
SCAL
E U
P
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 UpAdvantages
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. OutHow to design a 5TBSharePoint 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 SwitchesRedundant Web/Application ServersActive/Passive SQL w/ Redundant HBA’sRedundant SAN FabricRAID 1 StorageRedundant 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/PassiveUse 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 shippingMirroringStorage 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
Bring Databases OnlineAttach Databases to SharePointKickoff a CrawlUpdate DNS/WINSRestore SQL Mirroring
The Two Basic HA/DR Scenarios
Mirroring Within Farm Pros:
Great combo HA/DR solutionCheaper to implementEasier to manage
Cons:Requires closely located datacentersRequires excellent network conditionsNot flexibleContent corruption is replicated immediately.
Mirroring/Log ship Between Farms
Pros:Allows long distance separationCan protect against logical corruptionVery flexible!
Cons:More expensiveHarder to setup and manageFailover 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 filesDefrag 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 viewDefine 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 LUNSSpread databases on multiple spindlesFor 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
PerfmonMonitor transfer/sec for throughput trends.Monitor Disk sec/Read / Disk sec/Write for bottlenecks.Monitor disk Queue length for bottlenecks.
SQLSelect * 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
SummarySQL 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.
Search Disk Performance 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
Reference: http://blogs.msdn.com/enterprisesearch/archive/2008/05/19/sql-monitoring-and-i-o.aspx
Applying the Newest Learnings
Add more processor to the backend: 4 cores to 8 coresAdd more RAM: 16GB to 32GBRun 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.