Sharepoint SQL
Sharepoint SQL
Sharepoint SQL
Gold
AU ST R A L I A
SHAREPOINT CONFERENCE
MARCH 8+9 2011
Abstract
SharePoint is becoming more ubiquitous in the market as a critical core business application. Consequently it is more important than ever for DBAs to be cognisant of SharePoint's architecture and how to best provision, configure and manage the SQL Server infrastructure . In this session Victor Isakov (MCA, MCM, MCT, MVP) will explore the SharePoint 2010 architecture and considerations that every DBA should know, including capacity planning, performance management, configuration, disaster recovery and high availability.
2010 Victor Isakov www.sqlserversolutions.com.au
Victor Isakov
Victor Isakov is a Database Architect / Trainer who provides consulting and training services to various organizations in the public, private and NGO sectors globally, and been involved in different capacities at various international events and conferences. Victor specializes in:
SQL Server training Performance tuning and optimization Health-checks / Risk Assessments / review of SQL Server infrastructure Architecting / re-factoring database solutions Assessing the effectiveness of your outsourced services / licensing Consolidating / virtualizing / upgrading SQL Server
Rationale
Industry seems to be focused more on the development of the SharePoint solutions Little focus on infrastructure
SQL Server Storage Capacity / Performance Planning Disaster Recovery High-Availability
Management does not even know SharePoint runs on SQL Server SharePoint Gurus have head start on SQL Server DBAs Little real guidance from various vendors
Myths such as the 100GB content database limit
www.sqlserversolutions.com.au
SharePoint 2010
Microsoft has re-designed the architecture and database design in SharePoint 2010
Focus on scalability Focus on performance Focus on reliability / robustness
Which means:
BEGIN TRAN Everything I learnt about SharePoint 2007 Everything I was told about SharePoint 2007 ROLLBACK TRAN
Industry will potentially have to re-learn best practices, configuration, deployment, etc
Keep an eye out for Microsoft Whitepapers
www.sqlserversolutions.com.au
Outcomes
More awareness of SharePoints architecture and internals at a very high level
Represents starting point for you
Recognise the importance of capacity planning correctly Help design the right solution from the start
Engage your SharePoint IT pros early in the project
www.sqlserversolutions.com.au
Agenda
Basic SharePoint 2010 Architecture Deployment Models SharePoint 2010 Foundation Databases Capacity Planning
Software Boundaries SQL Server Configuration Content Database(s) Remote BLOB Storage Performance Planning
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Site Collection
A SharePoint site collection is a hierarchical set of sites that can be managed together.
Sites within a site collection have common features, such as shared permissions, galleries for templates, content types, and Web Parts, and they often share a common navigation. A site collection contains a single top level site, and any number of sub-sites organized in a hierarchy. A sub-site is a single SharePoint site within a site collection.
Main Enterprise Site IT Site Collection Whitepapers Site KPIs Site HR Site Collection Photos Site Booze Site
For DBAs
Site collection must reside within a single content database Can move site collections between content databases
Party Site
2010 Victor Isakov www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Minimal
Minimal Minimal High Medium
Minimal
Minimal Minimal High Medium
Minimal
Minimal Minimal Medium High
www.sqlserversolutions.com.au
Deployment Models
Single Server Deployment Small Farm Deployment Medium Farm Deployment Large Farm Deployment
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Core Databases
Configuration
Stores data about SharePoint databases, Internet Information Services (IIS) Web sites, Web applications, trusted solutions, Web Part packages, site templates, and Web application and farm settings specific to SharePoint 2010 Products, such as default quota settings and blocked file types.
Content
Store all content for a site collection, including site documents or files in document libraries, list data, Web Part properties, audit logs, and sandboxed solutions, in addition to user names and rights. All the data for a specific site collection resides in one content database on only one server. A content database can be associated with more than one site collection. One or more may be provisioned
www.sqlserversolutions.com.au
Core Databases
Usage and Health Data Collection
Stores health monitoring and usage data temporarily, and can be used for reporting and diagnostics
Subscription Settings
Stores features and settings for hosted customers
www.sqlserversolutions.com.au
Crawl
Stores the state of the crawled data and the crawl history One or more may be provisioned
Properties
Stores information that is associated with the crawled data, including properties, history, and crawl queues One or more may be provisioned
www.sqlserversolutions.com.au
Synchronization
Stores configuration and staging data for use when profile data is being synchronized with directory services such as Active Directory
Social tagging
Stores social tags and notes created by users, along with their respective URLs
www.sqlserversolutions.com.au
Reporting
Stores aggregated standard report tables, fact data aggregated by groups of sites, date and asset metadata, and diagnostics information for the Web Analytics service application
Secure Store
Stores and maps credentials, such as account names and passwords
State
Stores temporary state information for InfoPath Forms Services, the chart Web Part, and Visio Services
Managed Metadata
Stores managed metadata and syndicated content types
www.sqlserversolutions.com.au
I/O Pattern Read-intensive Scaling Strategy Recovery Model Mirroring Support Must scale up. FULL
Supports mirroring within farm Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
FULL Supports mirroring within farm Supports asynchronous mirroring / log-shipping to another farm for DR
www.sqlserversolutions.com.au
I/O Pattern Very write-heavy Scaling Strategy Recovery Model Mirroring Support Must scale up. SIMPLE Supports mirroring within farm Supports asynchronous mirroring or log-shipping to another farm for disaster recovery Microsoft does not recommend that you do. It is easily re-created in the event of a failure.
Location
As the database is very active it should be put on a separate disk or spindle if possible
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
FULL Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery.
www.sqlserversolutions.com.au
I/O Pattern Approximately equal read/write ratio Scaling Strategy Recovery Model Mirroring Support Location Scale up. Can scale out. SIMPLE Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery. The Administration database should fit into RAM on the server so that the server can handle the end-user query load most efficiently. Because of this requirement, it is usually best not to have the Administration and Crawl databases located on the same server.
www.sqlserversolutions.com.au
SIMPLE Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery. The Crawl database is very I/O intensive, and causes the SQL Server cache to be flushed regularly. In large-scale environments, Microsoft recommends that you locate this database on a server that does not contain the Property database or other databases involved in end-user tasks.
www.sqlserversolutions.com.au
SIMPLE Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery. At least one-third of the Property database should fit into RAM on the server. In large-scale environments, Microsoft recommends that you put this database on its own server to achieve faster query results.
www.sqlserversolutions.com.au
I/O Pattern Read-heavy Scaling Strategy Scale up. Can scale out.
Recovery Model
Mirroring Support
SIMPLE
Supports mirroring within farm.
www.sqlserversolutions.com.au
SIMPLE Does not support mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery.
www.sqlserversolutions.com.au
SIMPLE Does not support mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery.
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
FULL Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery.
www.sqlserversolutions.com.au
Recovery Model
FULL
Mirroring Support
Location
Supports mirroring within farm. Supports asynchronous mirroring or log-shipping to another farm for disaster recovery.
For secure credential storage, Microsoft recommends that the secure store database be hosted on a separate database instance or database server that has access limited to one administrator.
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
FULL Supports mirroring within farm. Does not support asynchronous mirroring or log-shipping to another farm for disaster recovery.
www.sqlserversolutions.com.au
Capacity Planning
Software Boundaries SQL Server Configuration
Processor Memory Storage
Content Database(s)
Purpose Considerations Remote BLOB Storage
Performance
www.sqlserversolutions.com.au
Software Boundaries
Boundaries
Absolute limit Example: 2GB document size limit
Thresholds
A default value that cannot be exceeded unless the value is modified Exceeding threshold may impact performance Example: Document size limit of 50MB by default
Supported Limit
Defined by testing and represent a known limitation of the product Exceeding supported limit may cause unexpected results, significant performance degradation or other detrimental effects Example: Support 500,000 site collections per web app.
Whitepaper: SharePoint Server 2010 Capacity Management: Software Boundaries and Limitations
2010 Victor Isakov www.sqlserversolutions.com.au
Microsofts Recommendations
SharePoint 2007 Items per view Documents per library Database size Simultaneous Doc Editors 2000 5 million 100GB SharePoint 2010 5000 10 million 200GB (Up to 1TB for workloads) 10 (max at 99)
1 (no Multi user editing of Word, Excel, PPT) Column 2000 per doc lib, 4096 per list New Row Wrapping with (rowOrdinal) (8,000 bytes) Content Databases per Web 100 300 App App Pools per web server 8 10 Indexed (Crawl Count) 50 Million items per SSP
Configuration Options
max degree of parallelism
www.sqlserversolutions.com.au
Best practices:
Multiple data files On separate LUN Equal in size Auto-growth in MB (decent size) Log file on separate LUN
www.sqlserversolutions.com.au
Processor
Can only run on 64-bit SQL Server SharePoint consumes a lot of connections / SPIDs / threads to SQL Server Ideally want as many logical cores as possible
Socket Core Hyper-threading
x86
x64 IA64
512KB
2MB 4MB
www.sqlserversolutions.com.au
Processor
Each Worker Thread consumes memory:
Number of CPUs <= 4 8 32-bit 256 288 64-bit 512 576
16
32
352
480
704
960
IMPORTANT TO CAPACITY PLAN MEMORY CORRECTLY IF YOU HAVE A LARGE NUMBER OF CPUS Rule of thumb: 4-6GB per core Example: 4 x Xeon E5540: 128 -192GB!
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Memory
Your SharePoint environment will almost certainly will be I/O bound, not compute bound Memory is critical to performance
Impact of BLOBs on Buffer Pool Impact of BLOBs on Windows
Alleviate disk sub-system problems Dont forget, more logical cores means more memory!
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Storage
Separate I/O intensive databases
Content database(s) Search database(s)
www.sqlserversolutions.com.au
Content is King!
Ultimately most organisations are going to use SharePoint to store content
Various lists Document Libraries BLOBs
www.sqlserversolutions.com.au
Content Database(s)
Purpose Considerations Remote BLOB Storage
SharePoint Web FE
SQL Server
Content Database
Config Database
www.sqlserversolutions.com.au
ContentDB Purpose
Used to store all documents that reside in Document Library
Default is to store as VARBINARY(MAX)
Used to store all lists Site collection has to reside within a single ContentDB Can create multiple ContentDBs
SharePoint will round-robin the creation of site collections between multiple ContentDBs
www.sqlserversolutions.com.au
ContentDB Provisioning
Different approaches:
Create ContentDBs as required Define ContentDB size limit Create new ContentDB when limit reached Will need to potentially move site collections when you hit the size limit Create multiple ContentDBs Let SharePoint round-robin the creation of site collections Create ContentDBs as required and control which site collections go in them No substitute for knowledge about how users will use the solution
www.sqlserversolutions.com.au
ContentDB Considerations
Serialization of the transaction log for document inserts and updates
My major concern for ECM solutions
Dont forget
SharePoint Foundation 2010 uses SQL Server 2008 Express which has a maximum size of 4 GB per database SQL Server 2008 R2 Express supports databases up to 10 GB in size
2010 Victor Isakov www.sqlserversolutions.com.au
(100,000 users)
Database size = (((200,000 x 2)) 250) + ((10 KB (600,000 + (200,000 x 2))) = 110,000,000 KB or 105 GB
www.sqlserversolutions.com.au
Does not store the actual BLOB Watch out for [MetaInfo] column
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Crickey...
2010 Victor Isakov www.sqlserversolutions.com.au
Two Options
Local FILESTREAM External Provider (Vendor Specific) Cloud SAN NAS
www.sqlserversolutions.com.au
RBS Architecture
SharePoint Web FE
SQL Server
Content Database
Config Database
BLOB Store X
BLOB Store Y
BLOB Store Z
Downloadable, add-in component Store all BLOBs external to ContentDB when Provider is active
2010 Victor Isakov www.sqlserversolutions.com.au
Relational Access
SQL Server
4. Write BLOB
BLOB Store
www.sqlserversolutions.com.au
Relational Access
SQL Server
3. Get BLOB Id
Content Database Config Database
5. Read BLOB
BLOB Store
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Content Database
Config Database
Tier 3 Store
Tier 2 Store
Tier 1 Store
After 1 year
After 3 months
www.sqlserversolutions.com.au
Idea is learn how much you can scale out upper tiers before SQL Server becomes the bottleneck
Then can scale up / scale out SQL Server
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Disaster Recovery
SharePoint has its own backup process But
www.sqlserversolutions.com.au
Usual suspects
RTO RPO Potential to quiesce SharePoint environment / databases Crash consistent backups VSS Backups
www.sqlserversolutions.com.au
High-Availability
There might be no native solution with SQL Servers technology stack
Might need to engage hardware vendors / ISVs What are you going to do with RBS? Test! Test! TEST!
But
2010 Victor Isakov www.sqlserversolutions.com.au
Perhaps we can get away with just mirroring the content databases. Most SharePoint databases can be mirrored through GUI
Rest done through PowerShell
www.sqlserversolutions.com.au
www.sqlserversolutions.com.au
Event processing
Log hardening Redo manager Redo threads
www.sqlserversolutions.com.au
Summary
Important to understand SharePoint architecture / topology Important to capacity plan SharePoint from the start
Do not let it get out of control
There are a large number of excellent whitepapers and other resources being released by Microsoft Engage with management, SharePoint IT Pros and other stakeholders Critical to test your DR and HA strategy
As I say: It always works on the whiteboard...
www.sqlserversolutions.com.au
Questions?
Email me at [email protected] I would like to you to gather some basic statistics about your SharePoint 2010 sites, collate them, and report those statistics back to the community.
www.sqlserversolutions.com.au
Gold Sponsors
Silver Sponsors
Bronze Sponsors