Post on 13-Dec-2014
description
Optimizing public facing SharePoint sites
Gunnar PeipmanIIS/ASP.NET MVP
http://weblogs.asp.net/gunnarpeipman/me@gunnarpeipman.com
About me
Name: Gunnar PeipmanFrom: Tallinn, EstoniaMVP: ASP.NET MVP for 4 yearsJob: developer, architect and
consultantCommunity: ENETA, speaker,
bloggerHobbies: new technology,
heavy metal, beers, national cuisines, travelling
Happy boyfriend, father, step father and owner of funny white rabbit
Agenda
Characteristics of public facing sitesWhy SharePoint Publishing Infrastructure?Caching filesOutput cacheUsing CDN-s
Session objectives
After this session you should understand:performance problems of public facing
siteshow caching works in SharePointhow to plan and configure cachinghow to measure cache
Characteristics
Accessible by anonymous usersHarder to estimate server loadMostly one-way communication
(this is what MS thinks)Different needs (design, SEO)Different publishing process
SharePoint Publishing Infrastructure
Targeted to public web sites and corporate in-house portals
Perfect fit for corporate information publishing
Publishing workflowsDifferent optimization options
Caching files
Request to page
Every file referencemeans new request
Most files are kept inSharePoint libraries
Professional designmeans hundreds offiles
Plus dynamically loaded files
Same time in server...
What is BLOB cache?
Files from doc libraries are cached to front-end servers
Perfect fit if per page load many requests are made to server
Perfect fit also for large filesSupport for e-tagsYou save:
◦Some database connections and queries◦Loading files to database server memory◦Moving files from db server to web server◦Some traffic
How to optimize
Keep blobs on separate physical diskEvery front-end server must have its own
blobs folder or diskIf disk crashes or you delete files from
blob cache you must reset blob cacheBlob cache may slow down your site for a
moment when files are copied to diskWhen measuring start from second
request
Output cache
Caching pages
Built on ASP.NET cachingOutput cache is served from memoryPossible to define cache profilesProfiles can be assigned to page layoutsCode-based policiesPossible to define non-cached areas
(called also donut hole caching)
Don’t over-cache!
Again: Output cache uses server memory!
Morning:
Noon:
Afternoon:
Evening:
How to measure cache?
Use ASP.NET and SharePoint performance counters
Make sure counters are not updated too often – it puts markable load on server
Measuring must be long enough to see how cache is actually used
No app-pool recycle or iisresetIf ~85% of requests are served from
cache you are okay
Output cacheData from real-life scenario
About measuring process
Performance counters on productionInterval 15 secondsCounters:
◦Total number of objects added◦Total object discards◦Cache hit count◦Cache hit ratio
Duration: 12h (work hours fully covered)No interruptions
Results
Content Delivery Networks (CDN)
CDN servers
Using CDN-s
Files are hosted on other serversUsers get files from closest serversMany popular JS libs are available in
Google and MS CDN serversYou can build your own CDN using
Windows Azure servicesPoint of trouble: wider internet outage
Q&A
Thank you!