SharePoint Best Practices
Try SPDocKitContact Us
  • SharePoint Best Practices Library by SPDocKit
  • Configuration
    • App Configuration
      • App Services Configured
      • Apps Configured
    • Distributed Cache
      • Appfabric Patched
      • Cache Cluster State
      • Cache Running
      • SharePoint Distributed Cache Size 2013
      • Distributed Cache Collocation Compliance
    • Security
      • Farm Account is not Local Admin
      • Office Web Apps HTTPS
    • Solutions
      • Solution Assembly Deployment Valid
    • Servers
      • Expired Certificates
      • Loopback Disabled
      • Minrole Compliance
  • Databases
    • ModelDB
      • ModelDB Files Autogrowth
      • ModelDB Files Initial Size
      • ModelDB Recovery Model
    • TempDB
      • TempDB Files
      • TempDB Files Configuration
      • TempDB Recovery Model
      • TempDB Response Times
      • TempDB Size
    • Content Database Autogrowth
    • Content Database Capacity
    • Database Files
    • Disk Allocation Size
    • Max Degree of Parallelism
    • SQL Alias
    • SQL Server Memory – SQL Server Memory Allocation Best Practices
  • Hardware Requirements
    • Free Disk Space
    • SharePoint 2013 Server and Hardware Requirements
  • Maintenance
    • Backup
      • Content Database Backups
      • Farm Backup Configured
      • Farm Backup History
    • Misc
      • Farm Accounts Used Interactively
      • PDF iFilter Installed
      • Upgrade Ready
  • Monitoring and Logging
    • Diagnostic Log Path
    • Enable Usage and Health Data Collection
    • SharePoint IIS Log Path
    • Restrict Trace Log Disk Space Usage
    • Search Index Path
    • ULS Active
    • Usage and Health Log Path
    • Verbose Logging Enabled
  • Service Applications
    • Search
      • Crawl Account Search Permission
      • Incremental Search Configuration
      • PDF Extension Added to Search Application
      • Search Content Sources
      • Search Running
    • UPA
      • My Site Configured
      • UPA Up and Running
    • Web Analytics
      • Event Collection Configured
      • Web Analytics Services Started
    • Application Proxies
    • Authentication Providers
    • Exchange Task Sync
    • Multiple Service Applications
    • Sandboxed Code Service
    • SharePoint 2013 Secure Store Service Configured
    • State Service
  • SharePoint Software Boundaries and Limits
    • SharePoint Software Boundaries and Limits Overview
    • Limits by Feature
      • Search Limits
        • Authoritative Pages
        • Content Sources
        • Crawl Components
        • Crawl Databases
        • Crawl Rules
        • Index Partitions
        • Managed Properties
        • Property Databases
        • Scope Rules Count per Search Service Application
        • Scope Rules Count per Search Scope
        • Search Topology Limits
        • Sharepoint Search Service Applications
        • Start Addresses
      • User Profile Limits
        • User Profile Count
      • Visio Services Limits
        • File Size of Visio Web Drawings – Max Web Drawing Size
        • Visio Services Cache Age
        • Visio Web Drawing Recalculation Time-out
      • Word Automation Services
        • Conversion Job Size
        • Conversion Start Frequency
    • Limits by Hierarchy
      • Content Database Limits
        • Content Database Size
        • Number of Content Databases
        • Site Collections per Content Database
      • Server Limits
        • Number of Application Pools
      • Site Collection Limits
        • Number of Site Collections
        • Site Collection Size
        • Web Site
      • Web Application Limits
        • Content Databases
        • Managed Paths
        • Number of Web Applications
        • Site Collections
  • Site Collection Health
    • Farm Features Duplicate IDs
    • Features Duplicate IDs
    • SharePoint Site Collection Upgrade – Upgrade SharePoint 2010 to 2013
    • Site Collections Duplicate IDs
    • Web Application Features Duplicate IDs
  • Updates
    • SharePoint
      • Build Revoked
      • Farm in Trial
      • Is SharePoint Up to Date
      • SharePoint 2013 Language Packs Up to Date
      • Office Web Apps Up to Date - Office Web App Servers
      • Product Supported
    • Servers
      • Sharepoint Server Upgrade Required
      • Windows Updates
      • Hotfixes per Server Role
        • Application Servers Hotfixes
        • DB Servers Hotfixes
        • Distributed Cache Servers Hotfixes
        • Failover Servers Hotfixes
        • Search Servers Hotfixes
        • WFE Servers Hotfixes
  • Web Applications
    • Caching
      • BLOB Caching Enabled
      • Object Cache User Accounts
      • Publishing Cache
    • AppPool User in Performance Log Group
    • Batch Compilation Disabled
    • Web Application in Debug Mode - Web.config Debugging How To
    • Web Application URL Check
    • Web Applications Without Sites
    • SharePoint Web.config Files Equality
Powered by GitBook
On this page
  • Issue description
  • Explanation
  • Solution
  • Additional information

Was this helpful?

  1. SharePoint Software Boundaries and Limits
  2. Limits by Hierarchy
  3. Site Collection Limits

Site Collection Size

Site Collection Size best practices report by SPDocKit determines whether site collections are growing beyond the recommended boundaries.

PreviousNumber of Site CollectionsNextWeb Site

Last updated 1 year ago

Was this helpful?

Issue description

This check determines whether site collections are growing beyond the recommended boundaries.

Explanation

contains one top site, document libraries, lists, and other items stored within SharePoint. It can contain one or more subsites. A site collection is stored within one content database, and it cannot be split over multiple content databases. It is an isolated unit containing its own structure and permission matrix.

A site collection can be as large as the content database size limit for the applicable usage scenario:

  • General usage – 200 GB

  • All usage scenarios (appropriate I/O subsystem design) – 4 TB

  • Document archive – no limits

However, we strongly recommend limiting the size of the site collections to 100 GB for the following reasons:

  • Certain site collection actions, such as site collection backup/restore or the Windows PowerShell cmdlet Move-SPSite, cause large SQL Server operations that can affect performance or fail if other site collections are active in the same database.

  • SharePoint site collection backup and restore is only supported for a maximum site collection size of 100 GB. For larger site collections, the complete content database must be backed up. If multiple site collections larger than 100 GB are contained in a single content database, backup and restore operations can take a long time and are at risk of failure.

Solution

Please check the size of the site collections in the content database. If you have a site collection larger than 100 GB, consider creating new content databases and moving all other site collections to the new content databases.

To create a new content database, start SharePoint 2013 Management Shell and run the following cmdlet:

New-SPContentDatabase "<database name>" -DatabaseServer "<database server / alias>" -WebApplication http://sitename

To move a site collection to the new content database, start SharePoint 2013 Management Shell as an Administrator and run the following cmdlet:

Move-SPSite http://webapp/sites/sitename -DestinationDatabase ContentDb2

To achieve the same result in Windows SharePoint Services 3.0 and SharePoint Server 2007, follow the procedure described in the following articles:

This script extracts the web application and site collection metrics. It also checks if the site collection is within 100GB boundaries and contains less than 250.000 site collections. It extracts the following information:

  • web application name, URL, site collections count and a list of site collections

  • site collection URL, site count, database name and storage used.

param(
[string]$OutputFile = "$(split-path -parent $MyInvocation.MyCommand.Definition)SiteMetrics.xml"
)

Write-Host "Extracting structure information to $OutputFile..."
"<Metrics>" | Out-File -FilePath $OutputFile -Append:$false

$spWebApps = Get-SPWebApplication
$spWAcount = 1
foreach ($spWebApp in $spWebApps)
{
    $percentComplete = [int](($spWAcount*100)/$spWebApps.Count)
    Write-Progress -Activity "Reading SharePoint farm structure..." -Status "Enumerating Web Applications, $percentComplete% completed..." -Id 0 -PercentComplete $percentComplete -CurrentOperation "Web Application: $($spWebApp.DisplayName) [Url: $($spWebApp.Url)]"
    "`t<WebApplication DisplayName='$($spWebApp.DisplayName)' Url='$($spWebApp.Url)' SiteCount='$($spWebApp.Sites.Count)'>" | Out-File -FilePath $OutputFile -Append:$true
    # export $spWebApp.DisplayName
    # export $spWebApp.Url
    # export $spWebApp.Sites.Count, check if bigger than ?
    $spSiteCount = 1

    foreach ($spSite in $spWebApp.Sites)
    {
        $sitePercentComplete = [int](($spSiteCount*100)/$spWebApp.Sites.Count)
        Write-Progress -Activity "Enumerating site collections, $sitePercentComplete% completed..." -Id 1 -PercentComplete $sitePercentComplete -CurrentOperation "Site collection: $($spSite.Url)" -ParentId 0
        # export $spSite.Url
        # export $spSite.Usage.Storage, check if bigger than 100GB
        # export $spSite.AllWebs.Count, check if bigger than 250.000    
        "`t`t<SiteCollection Url='$($spSite.Url)' Database='$($spSite.ContentDatabase.Name)' Storage='$($spSite.Usage.Storage)' WebCount='$($spSite.AllWebs.Count)'/>" | Out-File -FilePath $OutputFile -Append:$true
        if ($spSite.Usage.Storage -gt 100GB)
        {
            Write-Host "Warning: site collection $($spSite.Url) is larger than 100GB. Site collection size: $([int]($spSite.Usage.Storage/1GB))GB" -ForegroundColor Yellow
        }

        if ($spSite.AllWebs.Count -gt 250000)
        {
            Write-Host "Warning: site collection $($spSite.Url) has more than 250.000 sites. Number of sites: $($spSite.AllWebs.Count)" -ForegroundColor Yellow
        }

        $spSiteCount++
    }
    "`t</WebApplication>" | Out-File -FilePath $OutputFile -Append:$true
    $spWAcount++
}
"</Metrics>" | Out-File -FilePath $OutputFile -Append:$true

Additional information

Additional information can be found in the following articles:

Addcontentdb: Stsadm operation (Office SharePoint Server)
Move site collections to a new database (split a content database) (Windows SharePoint Services 3.0)
Software boundaries and limits for SharePoint 2013
New-SPContentDatabase
Move-SPSite
Move site collections between databases in SharePoint 2013
Addcontentdb: Stsadm operation (Office SharePoint Server)
Move site collections to a new database (split a content database) (Windows SharePoint Services 3.0)
1KB
get-bpsitemetrics.7z
archive
Download this script
Download SPDocKit