Joel Oleson Sr. Product Architect Quest Software Audience Poll New to SharePoint? SQL Admins? SharePoint Admins? Large-scale Implementation (+1 TB) experience? How many SQL Admins are freaking.

Download Report

Transcript Joel Oleson Sr. Product Architect Quest Software Audience Poll New to SharePoint? SQL Admins? SharePoint Admins? Large-scale Implementation (+1 TB) experience? How many SQL Admins are freaking.

Joel Oleson
Sr. Product Architect
Quest Software
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!
Session Overview
How were these “considerations” derived?
SQL Server 2008 with SharePoint
SharePoint Database Overview (Demo)
Sneak Peak Considerations for SharePoint 2010
SharePoint Databases
Overview
SharePoint Containment Hierarchy
Farm
Servers
Web Front End, APP, SQL
Web Applications
Central Admin, SSP Admin, Content
Databases
Content, Config, SSP, Search
Site Collections
Internet, Intranet Portal, Wikis, Blogs, Team, Doc, Mtg
Sites
Wikis, Blogs, Team, Doc, Mtg
Lists
Doc Lib, Pages, Events, Discussions, Surveys, etc…
Items
Files, calendar items, contacts, customers, images, custom
Understanding SharePoint Databases
Farm
• Config
• Servers
• Web Apps
• Solutions
• Global
Config
Web App
• Content 1..2
• Site
Collections
• Sites
• Lists
• Pages
• Documents
• DWPs
SSP
• Search
• Properties
• SSP
• My site
host config
• Profiles
• BDC config
• Excel Calc
Understanding Configuration DB
Config
Database
Sites
Servers
VServers
Understanding Content DB
Content
Database
Sites
Webs
Doc
Stream
Understanding SSP DB - Search
Search
Database
Search
Properties
Understanding SSP DB – SSP
SSP
Database
MySite
Host Config
Profiles
BDC Config
Excel Calc
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.
Slow
App
Slow
SQL
Database Disk I/O Demand
Most Demand
Medium Demand
Low Demand
Search
Config
*Content..
Temp
+SSP
Model
Tlogs
Master
* Except during backup and Indexing + Except during Profile Import
Top Performance Killers
1.
2.
3.
4.
5.
6.
7.
8.
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
Scaling SQL
2.5TB
2.5TB
SCALE OUT 
2.5TB
Scalling SQL - Out
More SQL servers = More flexibility
There aren’t really any physical barriers
SharePoint will allow you to place 100
databases on 100 different SQL instances
The real barriers are manageability and cost.
More servers = more money
More servers = more management
$$ + > management = $$$$
2.5TB
2.5TB
2.5TB
SCALE UP 
Scaling SQL
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
Kickoff
a Crawl
Attach
Databases
to
SharePoint
Bring
Databases
Online
Restore
SQL
Mirroring
Update DNS/WINS
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.
HA 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
Consider SQL 2008 Enterprise
SQL
Enterprise
SQL
Standard
SQL
Express
• Asynchronus Mirroring with compression
• Automatic Failover
• Transparent Database Encryption
• Backup Compression
• Resource Governor
• Synchronous Mirroring
• 2 Node Clustering
• Log Shipping with compression
• Restore Compressed Backup
• FREE
• Both Foundation and SharePoint 2010 use…
• (No WID in SharePoint 2010)
• 4 GB (2 Proc)
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
Define row limits on views. Use indexed
columns. Take it easy on column and field
counts.
SET NOCOUNT ON;SELECT Id, ListId, DirName, LeafName,
ItemChildCount AS FileCount,FolderChildCount AS
SubFolderCount FROM AllDocs WITH (NOLOCK) WHERE Type = 1
AND ListId IS NOT NULL
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)
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
Large List Throttling
You control
when and how
much!
Configurable
List Throttling
And Threshold
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
Automagically!
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.
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.
Resources
www.microsoft.com/teched
www.microsoft.com/learning
Sessions On-Demand & Community
Microsoft Certification & Training Resources
http://microsoft.com/technet
http://microsoft.com/msdn
Resources for IT Professionals
Resources for Developers
Complete an evaluation
on CommNet and enter to
win an Xbox 360 Elite!
Search Disk Performance
Drive
IOPs Read (max) IOPs Write
(max)
Ratio Read/
Write
Latency Read
(sec)
Latency
Write (sec)
Search DB 14.67
Logs
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 3,507.26
group
1,631.96
2.15
3.4360
3.2140
Crawl file 3,043.93
group
371.65
8.19
15.0840
15.8720
Reference:
http://blogs.msdn.com/enterprisesearch/archive/2008/05/19/sqlmonitoring-and-i-o.aspx
After Implementation: Lessons
Learned
We forgot all about the SSP. Duh!
SSP database absolutely hammered our CPU.
CPU Utilization around 100% most of the work day. Average
60%.
Learned that providing profiles to lots of consuming
web servers required more resources than originally
thought.
Each server needs to run profile sync.
Profile sync requires lots of processor time.
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.
© 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.