dat304 sql for share point hope odonovan

Upload: demsewa

Post on 30-May-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    1/34

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    2/34

    :AT304 Considerations for-arge Scale SharePoint

    eployments on Microsoft SQLServer

    Gary Hope SQL Guy

    Michael O Donovan SharePoint Guy

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    3/34

    Expectations

    Every deployment is differentSizeUsage Patterns

    Fundamental understandingWhat you should be looking for Tools and techniques to help

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    4/34

    Agenda

    SharePoint architecture basicsWhich SharePoint databases shouldconcern me

    Hardware selection basicsSharePoint database optimisationMonitoring my SQL Server(s)

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    5/34

    SharePoint Architecture

    (simplified)ASP .NET Web Server with SQLDatabasesAll content lives in SQL Databases

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    6/34

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    7/34

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    8/34

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    9/34

    Tour around SharePoint Create a new content database

    demo

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    10/34

    Performance Hot Spots

    Indexing ProcessProfile Import

    Timer Jobs (user sync from profile to

    user info)STSADM Backup & RestoreLarge List Operations

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    11/34

    Which database has most disk IOdemand?

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    12/34

    Database Disk IO 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

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    13/34

    SQL Hardware Selection

    x64 Windows and x64 SQLOnly x64 support in future versions

    Loads of RAM for SQL

    4GB 16GB (why more memory)Choosing server class hardware

    Scaling out always an option withSharePoint

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    14/34

    Database Configuration

    Data File Characteristic: TLOG = Sequential Write IODATA = Random Read and Write IO

    Separate TLog and Data onto separateDisksSeparate Databases onto separateDisks

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    15/34

    Disk I/O Optimization

    Partition Alignment

    Behavior prior to Windows Server 2008create partition primary align=format fs=ntfs unit=64K label="" nowait

    Chose RAID Configuration appropriatelyConfigure SAN appropriately

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    16/34

    SharePoint DBs

    ContentMax Size 100GBSite Collections / Database

    Use RAID 5 for data (or even better RAID10)Use RAID 10 for logs

    Usage is highly variable based on SharePointusage

    SearchUse RAID 10 logical units

    Usage is extremely read/write intensive

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    17/34

    SQL Server TempDB

    Create additional secondary files of equal size

    Optimal TempDB data file sizes can be

    calculated using the following formula: [MAX DB SIZE (KB)] X [.25] / [# CORES] =DATA FILE SIZE (KB)

    Rule of thumb: Calculation result

    (starting size) should be roughly equalto 25% of the largest content orsearch DB.

    Best managed by monitoring usage Trace Flag -T1118

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    18/34

    SQL Log and Data Locations Multiple Files for TempDB

    demo

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    19/34

    SharePoint Database Admin

    TasksBackup (and Restore)SQL Native Database and Log BackupsSystem Center Data Protection Manager

    Database Consistency CheckingDBCC CheckDBIndex Maintenance

    ALTER INDEX REBUILDManaging Performance

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    20/34

    Fragmentation Kills

    Performance Types of fragmentationData file - Specify appropriate file sizeLog file Specify appropriate file size

    Index REORGANIZE or REBUILDALTER INDEX REORGANIZE (> 5% and < =30%)

    ALTER INDEX REBUILD (> 30%)

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    21/34

    I/O Performance

    MeasurementPerformance Monitor Counters towatch:Disk Read/sec and Write/sec

    Compared with maximum achieved during test Typical systems will perform 100+ per spindle

    Average Disk sec/Read and sec/Write< 5ms for log writes and 100ms you will have a performance problemAverage Disk Queue Length

    Not the best measure in my opinion, compareto baseline

    Average Disk bytes/sec/Read and

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    22/34

    Set initial size of database( )auto grow

    Fragmentation of IW contentdatabase

    demo

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    23/34

    Performance Testing & ToolsStress Testing

    SQLIOVisual StudioSptdatapop (codeplex)

    Performance Monitoring Tools

    Performance Monitor SQL Performance Data Warehouse System Center Operations Manager

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    24/34

    Using Database Aliases

    Allow content database to be moved toother instances with no configchanges in SharePoint

    Can use DNS changes to move DBsto alternative instance in the case of database mirroring SQL Server Client Alias

    DNS Lookup

    Instance Name

    Resolution

    SQL 2005 or 2008Browser Service

    Windows DNSService

    CNAME Record

    A Record

    Connect to SQL SQL 2005 or 2008Database Service

    SQL Server Name = SQL Server NameSQL Server Name = Host Name, PortSQL Server Name = IP, Port

    If port unknown then lookup instance usingSQL Server Browser Service

    If IP unknown then lookup hostname usingWindows DNS Service

    1

    2

    3

    4

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    25/34

    What not to do

    Dont do anything else with these dBsNo new indexesNo new tablesNo stored procedure changes

    Couple of well known exceptionsMoving tables to filegroups to separate IO

    http://blogs.msdn.com/enterprisesearch/archiv

    http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450
  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    26/34

    Newer SQL and SharePointVersions

    SharePoint 2010x64 OnlySQL 2005+ Only

    SQL 2008 benefitsBackup Compression

    Transparent Database EncryptionDatabase Mirroring EnhancementPolicy Based AdministrationPerformance Data Warehouse

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    27/34

    5 Things to Take-Away

    SharePoint Database CharacteristicsHow to monitor them in your world

    Log and Data file locations for

    SharePoint DBsWindows Server 2003 misalignmentFragmentationSet initial size of database files (autogrow)

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    28/34

    W hite Papers

    C ap acity Plan n in g fo r S ea rch Pe rform an ce R ecom m en d a tion s

    D atab ase M a in ten an ce for S h arePo in t

    W orkin g w ith la rg e lists in O ffice S h arePoin t S e rve r 2 0 0 7

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    29/34

    R elated C ontent

    ( )Breakout Sessions session codes and titles( )Breakout Sessions session codes and titles

    ( ) Whiteboard Sessions session codes and titles( ) Whiteboard Sessions session codes and titles

    - ( )Hands on Labs session codes and titles- ( )Hands on Labs session codes and titles

    .e check with your Track Owner

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    30/34

    session evaluation and enter to win!session evaluation and enter to win!

    0 pairs of MP3 0 pairs of MP3 unglasses to be unglasses to be

    wonon

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    31/34

    &uestionanswer

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    32/34

    . . /www microsoft com teched

    &International ContentCommunity

    :// . /http microsoft com technet

    Resources for IT Professionals

    :// . /http microsoft com msdn

    Resources for Developers

    . . /www microsoft com learning

    &Microsoft Certification TrainingResources

    Resources.e avai lable after the event

    Tech Ed Africa 2009 sessions will bemade available for download the weekafter the event from: www.tech-ed.co.za

    http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450
  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    33/34

    . . , , / . . / 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

  • 8/14/2019 DAT304 SQL for Share Point Hope ODonovan

    34/34

    SharePoint Design Tips

    How many application pools?Each application pool takes RAM (1 2GB)Ensure Max Used Memory setting utilizes

    all the available RAM in your WFEs.

    Maximum Items in a list (is 2000 true?)Whitepaper: Working with large lists in OfficeSharePoint Server 2007

    http://go.microsoft.com/fwlink/?LinkId=95450

    OthersSite collections per web applicationSite collections per databaseSites per site collection

    http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450http://go.microsoft.com/fwlink/?LinkId=95450