+ All Categories
Home > Technology > SharePoint 2013 Performance Analysis - Robi Vončina

SharePoint 2013 Performance Analysis - Robi Vončina

Date post: 13-Dec-2014
Category:
Upload: sharepoint-and-project-conference-adriatics
View: 405 times
Download: 1 times
Share this document with a friend
Description:
This session introduces tools that can help you analyze and troubleshoot performance with SharePoint 2013. This sessions presents tools like perfmon, Fiddler, Visual Round Trip Analyzer, IIS LogParser, Developer Dashboard and of course we create Web and Load Tests in Visual Studio 2013. At the end we also take a look at some of the tips and best practices to improve performance on SharePoint 2013.
Popular Tags:
54
Performance Analysis SharePoint 2013 Robi Voncina SharePoint Server MVP
Transcript
Page 1: SharePoint 2013 Performance Analysis - Robi Vončina

Performance AnalysisSharePoint 2013

Robi VoncinaSharePoint Server MVP

Page 2: SharePoint 2013 Performance Analysis - Robi Vončina
Page 3: SharePoint 2013 Performance Analysis - Robi Vončina

Robi Vončina• Degree in economics• Started as MS Office instructor• System administrator• I started working with SharePoint from

2003 version on• Leader of SloSPUG

• MVP, MCSE, MCT

Page 4: SharePoint 2013 Performance Analysis - Robi Vončina

Agenda• Intro• Tools• Perfmon• Client Tools• SP Tools• IIS Tools• VS

• Configuration

Page 5: SharePoint 2013 Performance Analysis - Robi Vončina

Users want less than 3 seconds

Users will permit up to 5 seconds

Measure the end user experienceEffective Performance Analysis

Speed is a common complaint Users’ Reference

Page 6: SharePoint 2013 Performance Analysis - Robi Vončina

Performance Pyramid

Server Performance

Traffic

Configuration

LAN & WAN

User

Page 7: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picture

Tools

Page 8: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picturePerformance Monitor

Page 9: SharePoint 2013 Performance Analysis - Robi Vončina

Performance Monitor

Server Performance

Traffic

Configuration

LAN & WAN

User

Page 10: SharePoint 2013 Performance Analysis - Robi Vončina

Performance Monitor settings• The Process object in Performance Monitor can display Process IDs (PIDs)

• http://support.microsoft.com/kb/281884

• Click Start, click Run, type regedit, and then click OK.• Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\

SYSTEM\CurrentControlSet\Services\PerfProc\Performance• On the Edit menu, click New, and then click DWORD Value.• Right-click New Value #1, click Rename, and then

type ProcessNameFormat to name the new value.• Right-click ProcessNameFormat, and then click Modify.• In the Data value box, type one of the following values, and then click OK:

• 1: Disables PID data. This value is the default value.• 2: Enables PID data.

• Exit Registry Editor.

Page 11: SharePoint 2013 Performance Analysis - Robi Vončina

Performance Monitor• .NET CLR Exceptions • .NET CLR Loading• .NET CLR Memory• .NET Networking• ASP.NET• ASP.NET Applications• Memory• Network Interface• Physical Disk• Process• Processor• System• Web Service• Web Service Cache• Office Server Search Archival Plugin• Office Server Search Gatherer

• Add the Threads object when troubleshooting CPU Spikes/CPU high utilization.

• Make sure to use "Run As" so we can accurately capture the .NET counters. This should be run as the same account as the application pool.

• Setup performance logging at 5 second intervals.

• Select the Log Files tab and Configure button and set the preferred directory path and file name.  Limit the log file size to 250 MB and hit OK.

Page 12: SharePoint 2013 Performance Analysis - Robi Vončina

Using Perfmon• Create baseline performance monitoring

• Compare baseline to performance monitoring when troubleshooting

Page 13: SharePoint 2013 Performance Analysis - Robi Vončina

• Generic Counters• Counter NameLook for…• \Memory\Available BytesMore than 500 MB (SQL is different)• \Memory\Pages/SecAre we paging?• \Processor(_Total)\% Processor TimeAnywhere above70%

means you might • having queuing • \PhysicalDisk%perdisk%)\Avg. Disk Queue • Length• Less than 2-5 per cluster• Drill down to reads/writes queue length• \PhysicalDisk(%perdisk%)\Disk Writes/secLook for constanthigh

values• \PhysicalDisk(%perdisk%)\Avg.Disk • sec/Transfer• Less than 20milliseconds• \Network Interface([network • interface])\Output Queue Length• 0• \Network Interface([network • interface])\Bytes Total/sec• make sure you’re up to 50% of network • capacity

• ASP.Net

• \ASP.NET Apps v4.0.30319(__Total__)\Request

• Execution Time < 0.5 seconds Keepin mind network and rendering times

• \ASP.NET Apps v4.0.30319 (__Total__)\Requests/Sec

• Rough indication of RPS

• \ASP.NET Apps v4.0.30319 (__Total__)\Request Wait Time

• Are requests gettingqueued?

• \ASP.Net\Worker Process Restarts• Are we crashing often?

• \Process\Virtual Bytes> 4GB is suspicious

Page 14: SharePoint 2013 Performance Analysis - Robi Vončina

Counters to look for:SharePointMonitor cache performance in SharePoint 2013http://technet.microsoft.com/en-us/library/ff934623(v=office.15).aspx

• \SharepointPublishing Cache(/)\Object cache flushes / second

• Cache flushes are bad!

• \SharepointPublishingCache(/)\Object Cache Hit Ratio

• >99% (cache hit vs cache miss)

• \SharepointPublishing Cache(/)\Object Cache Misses / sec

• Close to 0

• BLOB cache, ASP.NET output cache, object cache

SQL• Focus on CPU and Disk IO

• SQLServer:Locks(_Total)\Average Wait Time (ms)• 0

• SQLServer:Locks(_Total)\Number of Deadlocks/sec• 0

• \SQLServer:AccessMethods\Full Scans/sec• < 100. Full scans are bad

• \SQLServer:GeneralStatistics\User Connections

Look at trend: make sure we’re not leaking• \SQLServer:CacheManager\Cache Hit Ratio

• > 85%

• Do we need to add more memory?

Page 15: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO

Page 16: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picture

Client Tools

Page 17: SharePoint 2013 Performance Analysis - Robi Vončina

Browser Timers

Server Performance

Traffic

Configuration

LAN & WAN

User

Page 18: SharePoint 2013 Performance Analysis - Robi Vončina

Fiddler• Flagging performance bottlenecks• Profiling the performance of your web app• Timeline for performance analysis• Simulate HTTP compression• Taking advantage of HTTP caching

Page 19: SharePoint 2013 Performance Analysis - Robi Vončina

Fiddler Add-Ons• Fiddler Html Inspector Part 3 | elastacloud = azurecoder +

bareweb• http://blog.elastacloud.com/2010/12/09/fiddlerhtmlinspector/

• Download Microsoft neXpert Performance Analysis Plugin from Official Microsoft Download Center• http://www.microsoft.com/en-us/download/details.aspx?id=11729

• StresStimulus | Load Testing Tool - Fiddler Extension• http://stresstimulus.stimulustechnology.com/

Page 20: SharePoint 2013 Performance Analysis - Robi Vončina

Fiddler Performance evaluation• Statistics• Request count• Bytes received

• Session list• Body• Caching• Consolidation

• Inspectors• Compression• Minification

• Timeline

Page 21: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO• Load Test Reports• file:///C:/

Users/robi/Documents/Fiddler2/StresStimulus/SPCAdriatics_2014_10_15_16_19_18_997.htm

• file:///C:\Users\robi\Desktop\Xnet\Tecaji\SPCAdriatics\2014\neXpert_15102014163139.html

Page 22: SharePoint 2013 Performance Analysis - Robi Vončina

Network Sniffers

Server Performance

Traffic

Configuration

LAN & WAN

User

Page 23: SharePoint 2013 Performance Analysis - Robi Vončina

Visual Round Trip Analyzer and Network Monitor

• Analyses Web against list of known best practices• Expiration Date• Bandwidth Efficiency • Time to First Byte• Image clustering 

• Utility Spotlight: 12 Steps To Faster Web Pages With Visual Round Trip Analyzer• http://msdn.microsoft.com/en-us/magazine

/dd188562.aspx

Page 24: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO

Page 25: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picture

SharePoint Tools

Page 26: SharePoint 2013 Performance Analysis - Robi Vončina

Developer Dashboard• Enable Dev Dashboard – Off by default$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService$dds = $svc.DeveloperDashboardSettings$dds.DisplayLevel = "On"$dds.Update()

• All request• SQL queries running against each request• ULS Logs• MDS

Page 27: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO

Page 28: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picture

IIS Tools

Page 29: SharePoint 2013 Performance Analysis - Robi Vončina

Log Parser• Log parser is a powerful, versatile tool that provides universal

query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory• Demo queries

Log Parser Rocks! More than 50 Examples! | LichtenByteshttp://mlichtenberg.wordpress.com/2011/02/03/log-parser-rocks-more-than-50-examples/

• Uses SQL statements to query logs

Page 30: SharePoint 2013 Performance Analysis - Robi Vončina

Log Parser Charts• Download Office 2003 Add-in: Office Web Components from

Official Microsoft Download Center• http://www.microsoft.com/en-us/download/details.aspx?id=22276

Page 31: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO

Page 32: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add pictureLoad Testing with Visual Studio

Page 33: SharePoint 2013 Performance Analysis - Robi Vončina

Load Testing

Server Performance

Traffic

Configuration

LAN & WAN

User

Page 34: SharePoint 2013 Performance Analysis - Robi Vončina

What You Need• Visual Studio Ultimate• Windows 7/8• Windows Server 2012/2012 R2• A test environment• Nerves of steel

Page 35: SharePoint 2013 Performance Analysis - Robi Vončina

Terms• Performance Testing• Does it work?

• Load Testing• Does it really work?

• Stress Testing• When does it stop working?

• Capacity or Scale Testing• Will it work for us?

Page 36: SharePoint 2013 Performance Analysis - Robi Vončina

More Terms• Solution• One or more projects

• Project• One or more tests

• Web Test• A series of web requests• Can be one or more pages or actions

• Load Test• Execution of one or more web tests• Has settings like browser, networks, users

Page 37: SharePoint 2013 Performance Analysis - Robi Vončina

Project

Page 38: SharePoint 2013 Performance Analysis - Robi Vončina

Create Web Test• Record steps in Internet Explorer• Make sure recording bits work• Easier on workstation• One type of request per web test• Can also create with Fiddler

Page 39: SharePoint 2013 Performance Analysis - Robi Vončina

Create Load Test• Add web tests to load test• Pick network profile• Pick browser profile• Can add multiple workstations to test• Can monitor servers from VS• Can export results to Excel

Page 40: SharePoint 2013 Performance Analysis - Robi Vončina

Add Network Shims• Needed to simulate network connections• C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\

IDE\VSTestConfig.exe networkemulation /install

• Save results to SQL• C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\

IDE\loadtestrepository.sql

Page 41: SharePoint 2013 Performance Analysis - Robi Vončina

DEMO

Page 42: SharePoint 2013 Performance Analysis - Robi Vončina

Click icon to add picture

Configuration

Page 43: SharePoint 2013 Performance Analysis - Robi Vončina

Infrastructure• Capacity planning for

SharePoint Server 2013• http://technet.microsoft.com/e

n-us/library/ff758645(v=office.15).aspx

• Hardware and software requirements for SharePoint 2013• http://technet.microsoft.com/e

n-us/library/cc262485(v=office.15).aspx

Component Minimum requirement

Processor •64-bit, 4 cores for small deployments (fewer than 1,000 users)•64-bit, 8 cores for medium deployments (between 1,000 to 10,000 users)

RAM •8 GB for small deployments (fewer than 1,000 users)•16 GB for medium deployments (between 1,000 to 10,000 users)For large deployments over 10,000 users, see the "Estimate memory requirements" section in Storage and SQL Server capacity planning and configuration (SharePoint Server 2010). This document does not apply to search in SharePoint 2013.These values are larger than those recommended as the minimum values for SQL Server because of the distribution of data that is required for a SharePoint 2013 environment. For more information about SQL Server system requirements, see Hardware and Software Requirements for Installing SQL Server 2008 R2.

Hard disk 80 GB for system driveHard disk space depends on how much content that you have in your deployment. For information about how to estimate the amount of content and other databases for your deployment, see Storage and SQL Server capacity planning and configuration (SharePoint Server 2010).

Page 44: SharePoint 2013 Performance Analysis - Robi Vončina

Database maintanance• Download Database Maintenance for Microsoft SharePoint

2010 Products from Official Microsoft Download Center• http://www.microsoft.com/en-us/download/details.aspx?id=24282

Page 45: SharePoint 2013 Performance Analysis - Robi Vončina

SharePoint Caching• Page• First request served from DB• Subsequent requests for same

resource read from memory

• Disk• File system objects• Database objects not cached

• Object• Cross site queries

• Publishing Features Enabled• Output cache• Object cache

• Max Cache Size

• Disk cache – Web.config• BLOBs

Page 46: SharePoint 2013 Performance Analysis - Robi Vončina

IIS Compression• Turned On but not configured• Reduces size of files• Caches compressed content on disk• Increases CPU utilization• Compression range from 0-9• Does not effect dynamic content

retrieved from Database• No UI, must run scriptAppcmd set config /section:httpCompression –[name='gzip'].dynamicCompressionLevel:9Appcmd set config /section:httpCompression –[name='gzip'].staticCompressionLevel:9

Page 47: SharePoint 2013 Performance Analysis - Robi Vončina

Throttling and Locks• SQL Server escalates row locks to table locks >5000 items• Query throttling reduces the impact of any single request by

limiting the amount of data queried

Page 48: SharePoint 2013 Performance Analysis - Robi Vončina

Branding• Minify javascript and CSS

files• Images stiching (CSS

sprites)• Better perfomance with few

large files than lots of small files

• Store CSS, master pages on file system• („/_layouts“ folder)

• SpriteMe• http://spriteme.org/

• Images Folder or Layouts --_layouts\images\• Cache-Control: max-

age=31536000• Client does not always ask if

newer version exists

• Document or Images Library• Cache-Control: Max-age=0• Expires: Current Date minus 2

weeks• Client always ask if newer

version exists –fix use blob caching

Page 49: SharePoint 2013 Performance Analysis - Robi Vončina

List items• List and libraries can hold millions of items – doesn‘t mean

they should• All user content in entire site collection is stored in single table

in the content database• Folders improve view performance NOT query performance

Page 50: SharePoint 2013 Performance Analysis - Robi Vončina

List definitions• Columns• Lookup columns• More columns more SQL rows• Can drastically reduce performance

Page 51: SharePoint 2013 Performance Analysis - Robi Vončina

Custom code• Web.Lists[“Documents”]

• 1 RT, 252 Read IOps

• Web.GetList(“/Shared Documents”)• 1 RT, 8 Read IOps

• ScriptLink.Register(“sp.js”); • 2.0 second delay of page content

display (at 1mbps)• 3 other JS files automatically

registered

• ScriptLink.RegisterOnDemand(“sp.js”);• 0.0 second delay of page content

display

• List.Items.Count vs. List.ItemCount• SPQuery is your friend• Disposing objects

Page 52: SharePoint 2013 Performance Analysis - Robi Vončina

Free Tool for Monitoring• SharePoint Performance Monitor• http://www.idera.com/productssolutions/freetools/spperformancemoni

tor

Page 53: SharePoint 2013 Performance Analysis - Robi Vončina

questions?Hvala za pozornost…Vprašanja??

Page 54: SharePoint 2013 Performance Analysis - Robi Vončina

thank you.

SHAREPOINT AND PROJECT CONFERENCE ADRIATICS ZAGREB, 10/15/2014 - 10/16/2014


Recommended