Rev Your Engines: SharePoint Performance Best Practices

29
SharePoint Performance Optimization ERIC SHUPPS MVP

Transcript of Rev Your Engines: SharePoint Performance Best Practices

Page 1: Rev Your Engines: SharePoint Performance Best Practices

SharePoint Performance OptimizationERIC SHUPPS

MVP

Page 2: Rev Your Engines: SharePoint Performance Best Practices

SPONSORS

Page 3: Rev Your Engines: SharePoint Performance Best Practices

About Me

@eshupps sharepointcowboywww.sharepointcowboy.com

slideshare.net/eshupps linkedin.com/in/eshupps

Eric ShuppsOffice Server MVP

Page 4: Rev Your Engines: SharePoint Performance Best Practices

Agenda

• Build to Suit• Make the Network Workf for You• The Database is King• Keep Traffic Moving• Cache In• Look Good but Perform Better

Page 5: Rev Your Engines: SharePoint Performance Best Practices

Architecture

Database

Search BI App

Users

Web Web

2007 & 2010

Page 6: Rev Your Engines: SharePoint Performance Best Practices

Architecture

Database

DistritbCache

DistribCache

RequestManager

RequestManager

RequestManager

OfficeWeb Apps

Workflow

Apps

Azure

O365

2013 & 2016

HY

BR

IDUsers

Search BI App

Web Web

Database

Page 7: Rev Your Engines: SharePoint Performance Best Practices

Internal Network• Capacity• Load• Traffic Isolation

• Web• Database• Service Applications• Search• Caching• Workflow• WAC

• Indexing

Page 8: Rev Your Engines: SharePoint Performance Best Practices

External Network

Migrations/Initial Data Transfer• Internal and External Bandwidth• ExpressRoute• Azure Storage

Cloud• Content Delivery Network• Geographic Distribution (WAN link

balancing)• Page contents

Page 9: Rev Your Engines: SharePoint Performance Best Practices

Database Optimization

Migration• Content

archiving• Page cleanup• Data purging• Shrink files• Versions!

Operations • Disk I/O• Index

maintenance• Auto-growth• Quotas

Disaster Recovery• Database size• Available

bandwidth

Page 10: Rev Your Engines: SharePoint Performance Best Practices

Database Distribution

• Provisioning overhead

• Data isolation

• Content storage• Query locks

and throttling

• Utilization• Recoverability

• Resource Consumption

• Availability

System Services

Site CollectionsLists

Page 11: Rev Your Engines: SharePoint Performance Best Practices

Database Fundamentals

Physical hardware resources

Network connectivity

Disk specifications

File location

Index maintenance

High availability

Page 12: Rev Your Engines: SharePoint Performance Best Practices

Request Management

• SharePoint aware rule based traffic shaping• Throttling• Routing• Prioritization• Load Balancing

Page 13: Rev Your Engines: SharePoint Performance Best Practices

Request Management Modes

Integrated Dedicated

Page 14: Rev Your Engines: SharePoint Performance Best Practices

Request Management Components

Machine Pool

RoutingTarget

RoutingTarget Execution Group

Throttling Rules

HealthWeight

StaticWeight

HealthWeight

StaticWeight

RoutingRule

RoutingRule

RoutingRule

RoutingRule

Page 15: Rev Your Engines: SharePoint Performance Best Practices

Request Management Rules

Throttling RulesRule1

Rule2

Rule3

Execution Group 0

Rule1

Rule2

Rule3

Execution Group 1

Rule5

Rule6

Rule7

Execution Group 3

Rule8

Rule9

Rule0

Machine Pool 1Serve

r1

Server2

Server3

Machine Pool 2Serve

r4

Server5

Server6

Page 16: Rev Your Engines: SharePoint Performance Best Practices

Request Management CommandsEnable RoutingGet-SPWebApplication | Set-SPRequestManagementSettings –RoutingEnabled $true –ThrottlingEnabled $true

Static WeightingGet-SPWebApplication | Get-SPRequestManagementSettings | Set-SPRequestManagementSettings –RoutingEnabled $true –ThrottlingEnabled $false –RoutingWeightScheme Static

Health WeightingGet-SPWebApplication | Get-SPRequestManagementSettings | Set-SPRequestManagementSettings –RoutingEnabled $true –ThrottlingEnabled $false –RoutingWeightScheme Health

Page 17: Rev Your Engines: SharePoint Performance Best Practices

Request Management CommandsAdd Routing Target$web=Get-SPWebApplication -Identity http://portal.lonestar.com

$rm=Get-SPRequestManagementSettings -Identity $web Add-SPRoutingMachineInfo –RequestManagementSettings

$rm -Name SP2013A -Availability Available

Create Routing Rule$w = Get-SPWebApplication -identity http://portal.lonestar.com$rmset = $w | Get-SPRequestManagementSettings$criteria = New-SPRequestManagementRuleCriteria -Property Url -Value ".*\.xlsx" -MatchType Regex

$mp = Add-SPRoutingMachinePool -RequestManagementSettings $rmset -Name DemoPool -MachineTargets ($rmset | Get-SPRoutingMachineInfo -Name SP2013A)

$rmset | Add-SPRoutingRule -Name "Excel Rule" -Criteria $criteria -MachinePool $mp

Page 18: Rev Your Engines: SharePoint Performance Best Practices

Distributed Cache

• Independent cache• No database persistence• Configurable memory allocation• Dedicated or collocated

Page 19: Rev Your Engines: SharePoint Performance Best Practices

Distributed Cache Dependencies

LoginTokenCache

AccessCache

Feeds(Activities,Likes,Mentions,Doc

Actions)

SearchQuery

Web Part

LastModifiedCache

SecurityTrimming

Cache

OneNoteThrottling

AppTokenCache

View StateCache

DefaultCache

Page 20: Rev Your Engines: SharePoint Performance Best Practices

Distributed Cache GuidelinesDeployment size Small farm Medium farm Large farm

Total number of users < 10,000 < 100,000 < 500,000

Recommended cache size for the Distributed Cache service

1 GB(Default 10% RAM)

2.5 GB(Manual adjustment)

12 GB(Limit of16GB per server)

Total memory allocation for the Distributed Cache service (double the recommended cache size above)

2 GB(Memory size must match in all servers)

5 GB 24 GB(32GB Max Limit)

Recommended architectural configuration

Dedicated server or co-located on a front-end server

Dedicated server Dedicated server

Minimum cache hosts per farm 1 1 1

Page 21: Rev Your Engines: SharePoint Performance Best Practices

Request Management CommandsProvision$instanceName ="SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} $serviceInstance.Provision()

Add ServerAdd-SPDistributedCacheServiceInstance

Set Cache SizeUpdate-SPDistributedCacheSize -CacheSizeInMB 1200

Page 22: Rev Your Engines: SharePoint Performance Best Practices

User Interface

• Client-side rendering• Optimized markup• Minimal download• Image renditions• Device Channels• Content by search

Page 23: Rev Your Engines: SharePoint Performance Best Practices

Customizations

Page Components

• Markup• Navigation• Images• Scripts• Code• Web and App

Parts

Branding

• Styles• Resources• Master Pages• JavaScript

Injection

Page 24: Rev Your Engines: SharePoint Performance Best Practices

Page Components

Page

Page

Master Page

Layout Page

NavigationControls

PermissionsMenu

OptionsWebParts

Data Sources

File System

Database External

Page 25: Rev Your Engines: SharePoint Performance Best Practices

Minimal Download

2010Page 1Controls

Chrome

Content

Page 2Controls

Chrome

Content

First Request

Second Request

2013Page 1

Controls

Chrome

Content

Page 2Controls

Chrome

Content

Dow

nloa

dMan

ager

Dow

nloa

dMan

ager

First Request

Second Request

Page 26: Rev Your Engines: SharePoint Performance Best Practices

Page Rendering

2010 2013

Page 27: Rev Your Engines: SharePoint Performance Best Practices

Page Weight

2010

29 Requests / 570KB

2013

21 Requests / 321KB

Page 28: Rev Your Engines: SharePoint Performance Best Practices

Office 365

MasterPage

Scripts

Branding

StyleAssets

ContentQuery

ContentSearch

ListViews

Apps

Navigation

StuffYou

Can’t Control

Page 29: Rev Your Engines: SharePoint Performance Best Practices

thank youquestions?

live ratingsBLOG URLTWITTER HANDLE

spca.biz/HHVA