SlideShare ist ein Scribd-Unternehmen logo
1 von 30
#SPSBE




Boosting Performance on
    Publishing sites
            #SPSBE14


        Karine Bosch
         SharePoint MVP
A big thanks to our sponsors
Platinum Sponsors




Gold Premium Sponsors            Venue Sponsor




Gold Sponsors
About me
• SharePoint MVP since 2008
• Technical assistent of Patrick Tisseghem till September 2008
• Developer of the U2U CAML Builder
• Technical Lead SharePoint Competence Center @ ING


• Blog: http://karinebosch.wordpress.com
• Twitter: kbosie
Agenda
• Introduction
• Caching data
• Techniques to reduce the page load
• Tools to measure performance
Introduction
• Data is stored in SQL Server database
• User requests require data
                                                      No Caching

                                   2. SQL Get Data

                  1. HTTP GET      3. Data Returned

                4. HTTP Response




• No caching limits scalability
• SharePoint caches run on the WFE(s)
• Caches maintain copies of data locally on WFE
• User requests are served from cache on WFE
Types of Caching
• Caching data
   • BLOB Cache       => caches files stored in the content database
   • IIS Cache        => caches files stored in the _layouts folder
   • Output Cache     => caches .aspx pages
   • Object Cache     => caches data objects


• Require addintional system resources
BLOB Cache
• BLOB = Binary Large Object
• BLOB cache is configured on Web Application level in
  web.config
• BLOB cache stores files from content database on a local
  directory of each WFE
   • Images, CSS files, JavaScript files
• Second request serves file from disk
• Tradeoff:
   • Extra roundtrips to SQL Server to fetch file
• Cache Invalidation
BLOB Cache
• BLOB Cache is highly optimized to serve anonymous requests
     • Images and SiteCollectionImages library have AllowEveryoneViewItems
       property set to True.
     • No SQL Server roundtrip to check user ACLs


•   Adds cache control headers to HTTP Responses to save file in user’s
    browser cache
BLOB Cache
• BLOB Caching is useful when
   • Resources are frequently accessed
   • Rich media is used (videos, etc)


• BLOB Caching is less useful when
   • Resources are not frequently accessed
   • Files are modified frequently
Configuring BLOB Cache
• BLOB Cache is configured in web.config of WFE
   • Local directory on WFE
   • Files with specific extensions
       • List of extensions can be configured
   • Size limit


 <BlobCache location="C:blobCache"
            path=".(gif|jpg|png|css|js)$"
            maxSize="10" max-age="86400"
            enabled="true"/>
Demo



  BLOB Cache
IIS Cache
• Files stored in _layouts/images folder of WFE
• Files are cached on
  local browser cache
• Default invalidation
  period: 365 days
Demo



  IIS Caching
Output Cache
• SharePoint Server uses ASP.NET output cache
   • In-memory cache that stores rendered ASPX pages per ASP.NET application
   • Reduces CPU load and SQL Server roundtrips
• In SharePoint Server only Publishing pages can be cached
   •   Publishing Feature fetches page layout and then content of the page
• Configured per site collection
• Output Cache is highly optimized for anonymous access
• Memory requirements:
   • (2 x page size) + 32 KB of memory per rendered copy of a page
Output Cache Profiles
• Configuration of Cache profiles
   • Specify the different variants of a page that can be stored in cache
   • Vary By


• Default cache profiles
   • Organaized by
        • user access rights
        • Browser type
Configuring Output Cache
• Following features must be enabled:
    • Publishing Infrastructure site collection feature
    • Publishing site feature


• Site collection settings
    > Site collection output cache
    • Enable output cache check box
Configuring Cache Profiles
• Cache Profiles specify the different variants of a page that can
  be stored in cache
• Site collection settings > Site collection cache profiles
• Fields that can be configured
    • Enabled
    • Duration
    • Check for Changes
    • Vary By Parameter
    • Perform ACL check
    • …
Demo



  Output Cache
Object Cache
• Stores data objects in-memory on WFEs
• Publishing features must be activated
• Some SharePoint artifacts use object cache mechanism by
  design:
   • Cross-list Query Cache
   • Content By Query Web Part
   • PortalSiteMapProvider API
   • Search Query Box
   • Metadata navigation
• HttpRuntime.Cache
Object Cache
• Data is cached based on user rights
   • PortalSuperUserAccount
   • PortalSuperReaderAccount
• Cache invalidation
• Size: allocate 500KB RAM per site collection
Configuring Object Cache
• Set up Portal Super Accounts
        $wa = Get-SPWebApplication -Identity "<WebApplication>"
        $wa.Properties["portalsuperuseraccount"] = "<SuperUser>"
        $wa.Properties["portalsuperreaderaccount"] = "<SuperReader>"
        $wa.Update()


• Site collection settings > Site collection object cache
• Tuning options
    • Max size
    • Flushing
    • Cache Invalidation
HttpRuntime.Cache Code Sample
•   ASP.NET cache class             string cacheKey = "BeersOfTheWeek";
                                    List<Beer> beerList = null;
•   Cache key
                                    // check the cache
                                    object o = HttpRuntime.Cache.Get(cacheKey);
•   Lock before retrieving data
    from database                   if (o == null)
                                    {
                                        object lockHandle = new object();
•   Insert object(s) in cache for       lock (lockHandle)
                                        {
    a certain period of time                // check again if cache is not filled again
                                            o = HttpRuntime.Cache.Get(cacheKey);
                                            if (o == null)
                                            {
                                                beerList = RetrieveWithQuery();
                                                if (beerList != null)
                                                {
                                                   // add the list to the cache
                                                   HttpRuntime.Cache.Insert(cacheKey, beerList,
                                                     null, DateTime.Now.AddMinutes(15.0),
                                                     TimeSpan.Zero);
                                                 }
                                              }
                                              else
                                                beerList = (List<Beer>)o;
                                        }
                                    }
                                    else
                                       beerList = (List<Beer>)o;
Demo



  Object Caching
Tools
• Tools to measure performance and page load
   • Firebug
   • Yslow
   • Developer Dashboard
   • SPMonitoredScope
Developer Dashboard
• Disabled by default
• Can be enabled via
   • Object Model
   • Stsadm
   • PowerShell
• Display levels
   • On
   • Off
   • On Demand
SPMonitoredScope
• Included for web parts
• Not included for custom controls
       using (SPMonitoredScope breweryBannerScope =
            new SPMonitoredScope(“Brewery Banner control”)
       {
          // your code goes here
       }
Demo



 Developer Dashboard and SPMonitoredScope
Reduce the Page Load
• Suppress JavaScript files and CSS files that are not used in
  anonymous mode
• Minimize JavaScript files
• Sprites
   • Images
   • CSS
Conclusion
• Improve performance using caching mechanisms:
   • BLOB cache       =>    files in document libraries
   • IIS cache        =>    files in _layouts folder
   • Output cache     =>    publishing pages
   • Object cache     =>    data objects


• Caching takes place on:
   • Web front ends
   • Client browser
We need your feedback!

                Scan this QR code or visit
                http://svy.mk/sps2012be


                Our sponsors:

Weitere ähnliche Inhalte

Was ist angesagt?

Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)Woonsan Ko
 
Mobile & Desktop Cache 2.0: How To Create A Scriptable Cache
Mobile & Desktop Cache 2.0: How To Create A Scriptable CacheMobile & Desktop Cache 2.0: How To Create A Scriptable Cache
Mobile & Desktop Cache 2.0: How To Create A Scriptable CacheBlaze Software Inc.
 
PHP projects beyond the LAMP stack
PHP projects beyond the LAMP stackPHP projects beyond the LAMP stack
PHP projects beyond the LAMP stackCodemotion
 
From SQL to MongoDB
From SQL to MongoDBFrom SQL to MongoDB
From SQL to MongoDBNuxeo
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcacheChris Westin
 
Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?Nuxeo
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksGuillermo Caicedo
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Mandakini Kumari
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)roland.huss
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQLPhilipp Fehre
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
Caching Enhancement in ASP.NET 4.0
Caching Enhancement in ASP.NET 4.0Caching Enhancement in ASP.NET 4.0
Caching Enhancement in ASP.NET 4.0Abhijit Jana
 

Was ist angesagt? (20)

Caching 101 - WordCamp OC
Caching 101 - WordCamp OCCaching 101 - WordCamp OC
Caching 101 - WordCamp OC
 
Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
 
Mobile & Desktop Cache 2.0: How To Create A Scriptable Cache
Mobile & Desktop Cache 2.0: How To Create A Scriptable CacheMobile & Desktop Cache 2.0: How To Create A Scriptable Cache
Mobile & Desktop Cache 2.0: How To Create A Scriptable Cache
 
PHP projects beyond the LAMP stack
PHP projects beyond the LAMP stackPHP projects beyond the LAMP stack
PHP projects beyond the LAMP stack
 
From SQL to MongoDB
From SQL to MongoDBFrom SQL to MongoDB
From SQL to MongoDB
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 
Asp.net caching
Asp.net cachingAsp.net caching
Asp.net caching
 
Caching in asp.net mvc
Caching in asp.net mvcCaching in asp.net mvc
Caching in asp.net mvc
 
Introduction to AJAX
Introduction to AJAXIntroduction to AJAX
Introduction to AJAX
 
Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?Nuxeo World Session: CMIS - What's Next?
Nuxeo World Session: CMIS - What's Next?
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & Tricks
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
Fluent 2012 v2
Fluent 2012   v2Fluent 2012   v2
Fluent 2012 v2
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)
 
Node.js and couchbase Full Stack JSON - Munich NoSQL
Node.js and couchbase   Full Stack JSON - Munich NoSQLNode.js and couchbase   Full Stack JSON - Munich NoSQL
Node.js and couchbase Full Stack JSON - Munich NoSQL
 
Aspnet Caching
Aspnet CachingAspnet Caching
Aspnet Caching
 
Windows Azure Caching
Windows Azure CachingWindows Azure Caching
Windows Azure Caching
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
Caching Enhancement in ASP.NET 4.0
Caching Enhancement in ASP.NET 4.0Caching Enhancement in ASP.NET 4.0
Caching Enhancement in ASP.NET 4.0
 

Andere mochten auch

SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...
SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...
SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...BIWUG
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...BIWUG
 
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG
 
Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31BIWUG
 
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...BIWUG
 
SharePoint Saturday Belgium 2014 - Best Practices for Configuring the ShareP...
SharePoint Saturday Belgium 2014 -  Best Practices for Configuring the ShareP...SharePoint Saturday Belgium 2014 -  Best Practices for Configuring the ShareP...
SharePoint Saturday Belgium 2014 - Best Practices for Configuring the ShareP...BIWUG
 
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003BIWUG 20/02/2006 Backup & Restore with SharePoint 2003
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003BIWUG
 

Andere mochten auch (7)

SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...
SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...
SharePoint Saturday Belgium 2014 - How to make your CEO understand or how to ...
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
 
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
BIWUG 01/09/2005 IW Technologies, what's to come in 2006?
 
Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31Penny coventry auto-bp-spsbe31
Penny coventry auto-bp-spsbe31
 
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...
SharePoint Saturday Belgium 2014 Killer combos: SharePoint, Project Siena and...
 
SharePoint Saturday Belgium 2014 - Best Practices for Configuring the ShareP...
SharePoint Saturday Belgium 2014 -  Best Practices for Configuring the ShareP...SharePoint Saturday Belgium 2014 -  Best Practices for Configuring the ShareP...
SharePoint Saturday Belgium 2014 - Best Practices for Configuring the ShareP...
 
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003BIWUG 20/02/2006 Backup & Restore with SharePoint 2003
BIWUG 20/02/2006 Backup & Restore with SharePoint 2003
 

Ähnlich wie Karine bosch caching-spsbe14

Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeMichael May
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)Michael Collier
 
SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)Brian Culver
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Brian Culver
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
Boost your website by running PHP on Nginx
Boost your website by running PHP on NginxBoost your website by running PHP on Nginx
Boost your website by running PHP on NginxHarald Zeitlhofer
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIStormpath
 
Nginx caching
Nginx cachingNginx caching
Nginx cachingreneedv
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutionswoutervugt
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipeilittlebtc
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experiencereeder29
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichunglittlebtc
 
CloudStack Object Storage Framework & Demo
CloudStack Object Storage Framework & DemoCloudStack Object Storage Framework & Demo
CloudStack Object Storage Framework & DemoShapeBlue
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and meJason Casden
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...Liam Cleary [MVP]
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timeJun-ichi Sakamoto
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803Andreas Grabner
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleRafał Leszko
 

Ähnlich wie Karine bosch caching-spsbe14 (20)

Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
Boost your website by running PHP on Nginx
Boost your website by running PHP on NginxBoost your website by running PHP on Nginx
Boost your website by running PHP on Nginx
 
Build a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON APIBuild a Node.js Client for Your REST+JSON API
Build a Node.js Client for Your REST+JSON API
 
Nginx caching
Nginx cachingNginx caching
Nginx caching
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
 
CloudStack Object Storage Framework & Demo
CloudStack Object Storage Framework & DemoCloudStack Object Storage Framework & Demo
CloudStack Object Storage Framework & Demo
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
 
Pre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing timePre-render Blazor WebAssembly on static web hosting at publishing time
Pre-render Blazor WebAssembly on static web hosting at publishing time
 
SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803SharePoint TechCon 2009 - 803
SharePoint TechCon 2009 - 803
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by example
 
Where to save my data, for devs!
Where to save my data, for devs!Where to save my data, for devs!
Where to save my data, for devs!
 
Mvc 4.0
Mvc 4.0Mvc 4.0
Mvc 4.0
 

Mehr von BIWUG

Biwug20190425
Biwug20190425Biwug20190425
Biwug20190425BIWUG
 
Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
Working with PowerShell, Visual Studio Code and Github for the reluctant IT ProWorking with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
Working with PowerShell, Visual Studio Code and Github for the reluctant IT ProBIWUG
 
Global Office 365 Developer Bootcamp
Global Office 365 Developer BootcampGlobal Office 365 Developer Bootcamp
Global Office 365 Developer BootcampBIWUG
 
Deep dive into advanced teams development
Deep dive into advanced teams developmentDeep dive into advanced teams development
Deep dive into advanced teams developmentBIWUG
 
SharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft FlowSharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft FlowBIWUG
 
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professionalMake IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professionalBIWUG
 
Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365BIWUG
 
Mining SharePoint data with PowerBI
Mining SharePoint data with PowerBIMining SharePoint data with PowerBI
Mining SharePoint data with PowerBIBIWUG
 
Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365BIWUG
 
Connect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure ADConnect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure ADBIWUG
 
Cloud First. Be Prepared
Cloud First. Be PreparedCloud First. Be Prepared
Cloud First. Be PreparedBIWUG
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!BIWUG
 
Advanced PowerShell for Office 365
Advanced PowerShell for Office 365Advanced PowerShell for Office 365
Advanced PowerShell for Office 365BIWUG
 
New era of customizing site provisioning
New era of customizing site provisioningNew era of customizing site provisioning
New era of customizing site provisioningBIWUG
 
Understanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsUnderstanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsBIWUG
 
Microsoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's nextMicrosoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's nextBIWUG
 
Microsoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashedMicrosoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashedBIWUG
 
What's new in SharePoint Server 2019
What's new in SharePoint Server 2019What's new in SharePoint Server 2019
What's new in SharePoint Server 2019BIWUG
 
Why you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine LearningWhy you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine LearningBIWUG
 
Transforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sitesTransforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sitesBIWUG
 

Mehr von BIWUG (20)

Biwug20190425
Biwug20190425Biwug20190425
Biwug20190425
 
Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
Working with PowerShell, Visual Studio Code and Github for the reluctant IT ProWorking with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
 
Global Office 365 Developer Bootcamp
Global Office 365 Developer BootcampGlobal Office 365 Developer Bootcamp
Global Office 365 Developer Bootcamp
 
Deep dive into advanced teams development
Deep dive into advanced teams developmentDeep dive into advanced teams development
Deep dive into advanced teams development
 
SharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft FlowSharePoint wizards - no magic needed, just use Microsoft Flow
SharePoint wizards - no magic needed, just use Microsoft Flow
 
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professionalMake IT Pro's great again: Microsoft Azure for the SharePoint professional
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
 
Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365Modern collaboration in teams and projects with Microsoft 365
Modern collaboration in teams and projects with Microsoft 365
 
Mining SharePoint data with PowerBI
Mining SharePoint data with PowerBIMining SharePoint data with PowerBI
Mining SharePoint data with PowerBI
 
Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365Don't simply deploy, transform! Build your digital workplace in Office 365
Don't simply deploy, transform! Build your digital workplace in Office 365
 
Connect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure ADConnect SharePoint Framework solutions to APIs secured with Azure AD
Connect SharePoint Framework solutions to APIs secured with Azure AD
 
Cloud First. Be Prepared
Cloud First. Be PreparedCloud First. Be Prepared
Cloud First. Be Prepared
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 
Advanced PowerShell for Office 365
Advanced PowerShell for Office 365Advanced PowerShell for Office 365
Advanced PowerShell for Office 365
 
New era of customizing site provisioning
New era of customizing site provisioningNew era of customizing site provisioning
New era of customizing site provisioning
 
Understanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsUnderstanding SharePoint Framework Extensions
Understanding SharePoint Framework Extensions
 
Microsoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's nextMicrosoft Flow in Real World Projects: 2 Years later & What's next
Microsoft Flow in Real World Projects: 2 Years later & What's next
 
Microsoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashedMicrosoft Stream - Your enterprise video portal unleashed
Microsoft Stream - Your enterprise video portal unleashed
 
What's new in SharePoint Server 2019
What's new in SharePoint Server 2019What's new in SharePoint Server 2019
What's new in SharePoint Server 2019
 
Why you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine LearningWhy you shouldn't probably care about Machine Learning
Why you shouldn't probably care about Machine Learning
 
Transforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sitesTransforming your classic team sites in group connected team sites
Transforming your classic team sites in group connected team sites
 

Kürzlich hochgeladen

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Karine bosch caching-spsbe14

  • 1. #SPSBE Boosting Performance on Publishing sites #SPSBE14 Karine Bosch SharePoint MVP
  • 2. A big thanks to our sponsors Platinum Sponsors Gold Premium Sponsors Venue Sponsor Gold Sponsors
  • 3. About me • SharePoint MVP since 2008 • Technical assistent of Patrick Tisseghem till September 2008 • Developer of the U2U CAML Builder • Technical Lead SharePoint Competence Center @ ING • Blog: http://karinebosch.wordpress.com • Twitter: kbosie
  • 4. Agenda • Introduction • Caching data • Techniques to reduce the page load • Tools to measure performance
  • 5. Introduction • Data is stored in SQL Server database • User requests require data No Caching 2. SQL Get Data 1. HTTP GET 3. Data Returned 4. HTTP Response • No caching limits scalability • SharePoint caches run on the WFE(s) • Caches maintain copies of data locally on WFE • User requests are served from cache on WFE
  • 6. Types of Caching • Caching data • BLOB Cache => caches files stored in the content database • IIS Cache => caches files stored in the _layouts folder • Output Cache => caches .aspx pages • Object Cache => caches data objects • Require addintional system resources
  • 7. BLOB Cache • BLOB = Binary Large Object • BLOB cache is configured on Web Application level in web.config • BLOB cache stores files from content database on a local directory of each WFE • Images, CSS files, JavaScript files • Second request serves file from disk • Tradeoff: • Extra roundtrips to SQL Server to fetch file • Cache Invalidation
  • 8. BLOB Cache • BLOB Cache is highly optimized to serve anonymous requests • Images and SiteCollectionImages library have AllowEveryoneViewItems property set to True. • No SQL Server roundtrip to check user ACLs • Adds cache control headers to HTTP Responses to save file in user’s browser cache
  • 9. BLOB Cache • BLOB Caching is useful when • Resources are frequently accessed • Rich media is used (videos, etc) • BLOB Caching is less useful when • Resources are not frequently accessed • Files are modified frequently
  • 10. Configuring BLOB Cache • BLOB Cache is configured in web.config of WFE • Local directory on WFE • Files with specific extensions • List of extensions can be configured • Size limit <BlobCache location="C:blobCache" path=".(gif|jpg|png|css|js)$" maxSize="10" max-age="86400" enabled="true"/>
  • 11. Demo BLOB Cache
  • 12. IIS Cache • Files stored in _layouts/images folder of WFE • Files are cached on local browser cache • Default invalidation period: 365 days
  • 13. Demo IIS Caching
  • 14. Output Cache • SharePoint Server uses ASP.NET output cache • In-memory cache that stores rendered ASPX pages per ASP.NET application • Reduces CPU load and SQL Server roundtrips • In SharePoint Server only Publishing pages can be cached • Publishing Feature fetches page layout and then content of the page • Configured per site collection • Output Cache is highly optimized for anonymous access • Memory requirements: • (2 x page size) + 32 KB of memory per rendered copy of a page
  • 15. Output Cache Profiles • Configuration of Cache profiles • Specify the different variants of a page that can be stored in cache • Vary By • Default cache profiles • Organaized by • user access rights • Browser type
  • 16. Configuring Output Cache • Following features must be enabled: • Publishing Infrastructure site collection feature • Publishing site feature • Site collection settings > Site collection output cache • Enable output cache check box
  • 17. Configuring Cache Profiles • Cache Profiles specify the different variants of a page that can be stored in cache • Site collection settings > Site collection cache profiles • Fields that can be configured • Enabled • Duration • Check for Changes • Vary By Parameter • Perform ACL check • …
  • 18. Demo Output Cache
  • 19. Object Cache • Stores data objects in-memory on WFEs • Publishing features must be activated • Some SharePoint artifacts use object cache mechanism by design: • Cross-list Query Cache • Content By Query Web Part • PortalSiteMapProvider API • Search Query Box • Metadata navigation • HttpRuntime.Cache
  • 20. Object Cache • Data is cached based on user rights • PortalSuperUserAccount • PortalSuperReaderAccount • Cache invalidation • Size: allocate 500KB RAM per site collection
  • 21. Configuring Object Cache • Set up Portal Super Accounts $wa = Get-SPWebApplication -Identity "<WebApplication>" $wa.Properties["portalsuperuseraccount"] = "<SuperUser>" $wa.Properties["portalsuperreaderaccount"] = "<SuperReader>" $wa.Update() • Site collection settings > Site collection object cache • Tuning options • Max size • Flushing • Cache Invalidation
  • 22. HttpRuntime.Cache Code Sample • ASP.NET cache class string cacheKey = "BeersOfTheWeek"; List<Beer> beerList = null; • Cache key // check the cache object o = HttpRuntime.Cache.Get(cacheKey); • Lock before retrieving data from database if (o == null) { object lockHandle = new object(); • Insert object(s) in cache for lock (lockHandle) { a certain period of time // check again if cache is not filled again o = HttpRuntime.Cache.Get(cacheKey); if (o == null) { beerList = RetrieveWithQuery(); if (beerList != null) { // add the list to the cache HttpRuntime.Cache.Insert(cacheKey, beerList, null, DateTime.Now.AddMinutes(15.0), TimeSpan.Zero); } } else beerList = (List<Beer>)o; } } else beerList = (List<Beer>)o;
  • 23. Demo Object Caching
  • 24. Tools • Tools to measure performance and page load • Firebug • Yslow • Developer Dashboard • SPMonitoredScope
  • 25. Developer Dashboard • Disabled by default • Can be enabled via • Object Model • Stsadm • PowerShell • Display levels • On • Off • On Demand
  • 26. SPMonitoredScope • Included for web parts • Not included for custom controls using (SPMonitoredScope breweryBannerScope = new SPMonitoredScope(“Brewery Banner control”) { // your code goes here }
  • 27. Demo Developer Dashboard and SPMonitoredScope
  • 28. Reduce the Page Load • Suppress JavaScript files and CSS files that are not used in anonymous mode • Minimize JavaScript files • Sprites • Images • CSS
  • 29. Conclusion • Improve performance using caching mechanisms: • BLOB cache => files in document libraries • IIS cache => files in _layouts folder • Output cache => publishing pages • Object cache => data objects • Caching takes place on: • Web front ends • Client browser
  • 30. We need your feedback! Scan this QR code or visit http://svy.mk/sps2012be Our sponsors:

Hinweis der Redaktion

  1. A SharePoint Server installation consists of an instance of Microsoft® SQL Server® and at least one front-end web server. When users request data (for example, a page or document) from SharePoint Server, the SharePoint application, running on the front-end web server, retrieves all the relevant data from SQL Server to handle the user request. Although this ensures that all users always see the most up-to-date data, it has the downside of requiring constant data traffic between SQL Server and the front-end web server.
  2. Extra roundtrips are to fetch permission and other metadata so the cache can serve the file securely. Also, to avoid serving stale content, the BLOB cache will toss out files if there is any chance that the cached copy might be out of date. After a file has been removed from the cache, the first hit penalty applies again to re-cache the file.In addition to reducing SQL Server round trips, the BLOB cache also helps reduce the time it takes to reload web pages by adding cache control headers to the HTTP responses for the files it serves. These headers tell the user’s browser to save these files in the browser’s cache. When the browser needs one of the cached files, it can use its cache instead of making requests to SharePoint Server. This results in fewer HTTP requests and a significantly reduced page load time.If there is content in the site that doesn’t have to be secured it would be beneficial to enable anonymous access to those files to take advantage of the BLOB cache’s optimizations for anonymous authentication.How BLOB cache can be configured with extended web app: pg 6
  3. Extra roundtrips are to fetch permission and other metadata so the cache can serve the file securely. Also, to avoid serving stale content, the BLOB cache will toss out files if there is any chance that the cached copy might be out of date. After a file has been removed from the cache, the first hit penalty applies again to re-cache the file.In addition to reducing SQL Server round trips, the BLOB cache also helps reduce the time it takes to reload web pages by adding cache control headers to the HTTP responses for the files it serves. These headers tell the user’s browser to save these files in the browser’s cache. When the browser needs one of the cached files, it can use its cache instead of making requests to SharePoint Server. This results in fewer HTTP requests and a significantly reduced page load time.If there is content in the site that doesn’t have to be secured it would be beneficial to enable anonymous access to those files to take advantage of the BLOB cache’s optimizations for anonymous authentication.How BLOB cache can be configured with extended web app: pg 6
  4. Example:The BLOB cache handles multiple requests for the same file by sharing the cached copy with all the requests. It can even do this before the file has been completely read from SQL Server. For example, a 500 MB video of a keynote presentation is posted on SharePoint Server and then a link to this video is sent out via email. There can be many users accessing the file at the same time. SharePoint Server (without the BLOB cache) would fetch the video from SQL Server once for every user requesting it. That would have huge performance implications for anyone else using the site. With the BLOB cache, even if the video isn’t yet fully cached, the video would be retrieved only once (per front-end web server) from SQL Server to handle all the requests. This optimization makes the BLOB cache indispensible for serving large files from SharePoint Server.
  5. Configuring the application poolWhen you enable the BLOB cache, increase the startup and shutdown time limits for the application pool. The recommended setting is at least 300 seconds. This will allow the BLOB cache enough time to initialize or serialize its index on startup or shutdown. Setting this value to 300 seconds does not cause it to take 300 seconds to start or stop, but it does prevent IIS from terminating the application pool until 300 seconds have elapsed. Increasing this limit, especially the shutdown limit, prevents the application from being terminated – possibly when the cache is serializing its index. If the index isn’t completely serialized it is considered corrupted and the cache is flushed on the next startup.Maintaining the BLOB cache: pg 19
  6. QUESTION: why store images in content database and not all in _layoutsfolder? ANSWER: updatable by users/content editors. Otherwisedeployment of Administratorrequested.
  7. This cache can help increase page throughput and reduce CPU load on the front-end web server and the instance of SQL Server because pages won’t have to be re-rendered on each request. If a site is configured for anonymous access, the front-end web servers won’t even have to request data from SQL Server to do a permission check for cached requests. In SharePoint Server only Publishing pages can be cached in the output cache. When a Publishing page is rendered, the Publishing feature assembles the page dynamically. To do this, Publishing must first fetch the page layout and then fetch the contents of the page. Both of these operations incur SQL Server round trips that affect throughput and latency. To increase throughput and scalability, Publishing pages can use the output cache so that pages aren’t rendered on each request.Publishing is a feature in SharePoint Server that allows the separation of content and its presentation. In this model a page layout is created that defines the place holders for content; pages are the containers for the content. The target scenario for this feature is an Internet facing web site that has multiple content contributors where all of the content shares a common page structure.Cache ProfilesThe cache profile is a collection of settings and parameters that are used to determine if and how a page will be cached. For example, a profile might require that pages are not cached when the requestor is someone that can edit the page so that the user can see the latest version. Another profile might specify that different copies of the pages should be generated depending on what browser is making the request. Along with those settings, the cache profile also specifies how pages in the cache are invalidated. When a page is invalidated, the next request for that page is re-rendered. This new rendered copy replaces the invalidated copy in the cache.+ pg 11Vary Bypg 11
  8. This cache can help increase page throughput and reduce CPU load on the front-end web server and the instance of SQL Server because pages won’t have to be re-rendered on each request. If a site is configured for anonymous access, the front-end web servers won’t even have to request data from SQL Server to do a permission check for cached requests. In SharePoint Server only Publishing pages can be cached in the output cache. When a Publishing page is rendered, the Publishing feature assembles the page dynamically. To do this, Publishing must first fetch the page layout and then fetch the contents of the page. Both of these operations incur SQL Server round trips that affect throughput and latency. To increase throughput and scalability, Publishing pages can use the output cache so that pages aren’t rendered on each request.Publishing is a feature in SharePoint Server that allows the separation of content and its presentation. In this model a page layout is created that defines the place holders for content; pages are the containers for the content. The target scenario for this feature is an Internet facing web site that has multiple content contributors where all of the content shares a common page structure.Cache ProfilesThe cache profile is a collection of settings and parameters that are used to determine if and how a page will be cached. For example, a profile might require that pages are not cached when the requestor is someone that can edit the page so that the user can see the latest version. Another profile might specify that different copies of the pages should be generated depending on what browser is making the request. Along with those settings, the cache profile also specifies how pages in the cache are invalidated. When a page is invalidated, the next request for that page is re-rendered. This new rendered copy replaces the invalidated copy in the cache.+ pg 11Vary Bypg 11
  9. QUESTION: why store images in content database and not all in _layoutsfolder? ANSWER: updatable by users/content editors. Otherwisedeployment of Administratorrequested.
  10. More detailspg 22, 23
  11. Examples: properties of SPWeb or SPList, custom objects.Remark: don’t store SPWebobject in object cache!The PortalSiteMapProvider is a public API that can be used to execute a query, and the results that are returned will be cached. For example, an image rotator could be written that would query a list to get the URLs of 10 images.
  12. When a control asks the object cache to make a query to get data, the cache will not make the query as the user making the request but instead will make the query twice: once as a user called the PortalSuperUserAccount (referred to as Super User) and once as PortalSuperReaderAccount (referred to as Super Reader). The results for the Super User query will include draft items and the results for the Super Reader query will include only published items. The cache detects duplicates and single instances the results set. The cache will then check the ACLs for the user that initiated the request and will return the appropriate results to that user. Because of the Portal Super Account users, the cache only has to store results for two users which will increase hit count and decrease the cache’s memory footprint.Out of the box, the Super User account is the web application’s System Account and the Super Reader account is NT Authority\\Local Service. Farm administrators are advised to change the default accounts for the following reasons. Some items get checked out to System Account (In Place Records is a feature that does this). When a query is made that includes these items, the checked-out version of the items is returned instead of the latest published version. That is usually not what is expected to be returned and the cache has to make a second query to fetch the versions of the file that is not checked out. This extra SQL Server round trip results in a performance hit for every query that includes these checked out items. The same would be true for any user account if that account were used for the Super User account and the user had items checked out. The user configured to be the Super User or Super Reader should not be an account that is used to log into the site or run programs that use the SharePoint API to make changes to a site. This is a precaution that will ensure the Portal accounts aren’t inadvertently used to check items out. Also, don’t use the application pool account or any account that has “Runs as System” checked in the user policy on the web application because these accounts will have the same undesirable behavior as the default account. Finally, the cache needs to have results from users who can and cannot see drafts so the Super User and Super Reader accounts must not be the set to the same account. The cache will not perform correctly if the Super User and Super Reader accounts are set to the same account.SharePoint always returns the checked-out version for items that a user has checked out.Cache invalidation: pg 15
  13. Intro: The object cache cannotbedisabled and thereislittlethatcanbeconfigured. None of the out of box settings should have to be changed, but there are two user accounts that should be set up to ensure the best performance. Configure Portal Super Accounts: pg 25Tuning options: pg 26Configure object cache max size: pg 27
  14. In web.configIn code:portalSiteMapProvider = siteMapProvider as PortalSiteMapProvider; portalSiteMapProvider.DynamicChildLimit = 0; portalSiteMapProvider.EncodeOutput = true; portalSiteMapProvider.IncludePages = PortalSiteMapProvider.IncludeOption.Always; portalSiteMapProvider.IncludeSubSites = PortalSiteMapProvider.IncludeOption.Never;