Improving Sharepoint Performance: 5 Key Optimization Tips

Leveraging Caching to Boost Speed

Caching allows commonly accessed pages and session data to be temporarily stored, or cached, in memory for faster retrieval times. Enabling caching in SharePoint can significantly improve performance by reducing load on the database and web servers. Here are three key caching techniques to leverage:

Enable output caching for commonly accessed pages

Output caching stores the final HTML rendered page in the web server’s memory. Subsequent requests for the page can be served directly from cache without having to rerun queries or rebuild the page. This avoids unnecessary processing and trips to the database. Output caching is suitable for pages that do not contain personalized or dynamic data. In SharePoint, navigate to Site Settings > Site Administration > Output Cache Profiles to configure caching rules and durations for specific pages or site templates. Set cache durations from one minute up to several days for suitable pages.

Configure distributed caching for session state

Session state contains user data as they interact with a SharePoint site. By default, session data is stored locally on each web server. For large SharePoint farms, consider enabling distributed caching. This stores session data in a dedicated caching service running outside the web servers. Distributed caching centralizes session storage for higher reliability and performance. Navigate to SharePoint Central Administration > System Settings > Configure Cache Accounts to set up a cache cluster for distributing session data.

Use cache profiles for fine-grained control

Cache profiles in SharePoint provide granular control over what data is cached and for what duration. Create multiple cache profiles to apply customized caching rules tailored to specific sites, lists, libraries or page layouts. Some common uses include caching search filters, query results or directory lookup data that is frequently reused. Refer to cache usage reports to identify data hotspots then leverage cache profiles to optimize caching strategies for maximum performance gains.

Optimizing Queries and Connections

Optimizing the database tier improves the responsiveness of SharePoint sites by enabling more efficient data queries and reuse of backend connections. Techniques to optimize the storage and retrieval of SharePoint data include:

Index columns used for sorting, filtering, and joining

Indexes make it faster to lookup and return data rows that match a certain column value. Determine what columns are frequently filtered or sorted on major lists and libraries. Also check columns used to join or correlate data across multiple lists. Add indexes on these columns to improve the speed of underlying queries and data aggregation in views, search results and other UI elements.

Use connection pooling to reuse database connections

Opening a new database connection for every query adds significant overhead. Connection pooling allows reusing existing connections from a standby pool instead of closing and reopening connections. Enable connection pooling in SharePoint to avoid connection open/close bottlenecks. Tune the pool size based on peak usage load. Larger pools may improve throughput but consume more memory on the database server.

Add indexes to large lists and libraries

SharePoint indexes list columns on the fly to service queries or views. But it can be expensive for very large, active lists with over 5,000 items. Pre-emptively index the most commonly sorted or filtered columns on such big lists. Also consider throttling list view thresholds if expanding indexes is not viable. Indexes add overhead during data loads so size them appropriately based on typical query patterns.

Minifying Resources to Reduce Payload Size

Bundling and minification techniques optimize how JavaScript, CSS and other assets are delivered to the browser. Applying these techniques in SharePoint produces smaller payloads that require less bandwidth and are faster to download:

Configure bundle and minification for CSS/JS

Bundling combines multiple CSS/JS files together into consolidated files sent to the client. Enable bundling in SharePoint site settings to avoid many small resource requests. Minification removes comments and whitespaces from CSS/JS files to compress their size even smaller without affecting functionality. Minification is built into the SharePoint bundling module and kicks in automatically once bundling is enabled.

Enable static content compression on web servers

Web servers can also compress content before sending to reduce payload sizes. Static file types such as HTML, CSS, JS and media files compress very well. Enable static compression settings on your SharePoint web servers including IIS dynamic compression for maximum bandwidth savings on all static resources.

Use CDNs to distribute static assets

A content delivery network or CDN hosts static files in cache servers distributed across different geographic regions. Users download files from edge locations closest to them for faster speeds. CDNs also save WAN bandwidth for multi-site SharePoint deployments. Check if your organization has an existing CDN that can be leveraged or explore third-party CDNs.

Tuning Application Pools for Higher Concurrency

SharePoint application pools contain configuration settings that determine how many simultaneous requests they can handle. Tune these thresholds to meet increasing demand:

Increase queue length and timeout thresholds

The queue length sets how many requests an application pool will queue before rejecting additional requests. Increase this well beyond the default of 5000 queued requests to handle short bursts of traffic. Also increase idle request timeouts so queued requests wait longer before timing out.

Scale out web servers to handle more requests

If tuning queues and timeouts is inadequate, add more web servers to expand capacity. This scales out the web tier horizontally to handle higher request volumes and improves overall throughput. Load balance requests appropriately across the additional resources.

Profiling with Developer Tools

Diagnosing and finding optimization opportunities requires gathering intelligence on the current performance and resource usage of a SharePoint environment under real user loads. Useful profiling techniques include:

Use browser tools to find slow elements

Modern browser developer tools include powerful performance analysis to measure page load times, identifies slow running JavaScript code, compile CSS/JS bottlenecks, finds unoptimized images and other useful insights. Profile site pages under anonymous user contexts identifying front-end issues.

Analyze ULS logs for errors and bottlenecks

The SharePoint unified logging service (ULS) logs extensive diagnostics information from all layers of the platform during site usage. Inspect ULS logs to pinpoint exceptions and correlate performance issues stemming from different tiers. Third-party logger tools help quickly parse and visualize ULS data.

Profile database queries to optimize data access

For deeper diagnosis, the database server contains profiling tools to capture metrics on all queries, query plans, index usage statistics and connections. Enable SQL query profiling to optimize data schemas, add missing indexes, identify inefficient code and slow page rendering.

Leave a Reply

Your email address will not be published. Required fields are marked *