Performance Troubleshooting
Performance Troubleshooting
Intermediate
Dynamic Properties are they really neccessary? Pages with large strings (MainBody) is also a problem News archives will slowly kill your site Edit mode, expanding the tree loads two levels
Key Points
The devil is in the details
- You dont TRULY know until you have profiled
Fixing it!
Split up page lists with more then 250 pages into subtrees
- Why 250? Practical reasons for editors - Use Date Containers (/News/2007/June/My-news-article) - Moving pages using code is easy
You dont even need to recompile (no code behind file neccessary). See ArchiveBuilder.aspx If there are many pages, it will take some time
Cache the list Move Dynamic Properties to the Start Page This problem has less impact in CMS 5
10
FindPagesWithCriteria (FPWC)
The most resource intensive operation in EPiServer Very useful, and most sites need it It will search the database, returning all pages that match the criterias
11
Fixing it!
Use log4net to detect FPWC calls
- Log all FPWC calls to one file, with page id and search ref
- Limit the count of returned pages. The database call is not the problem, working with a large resultset is
12
13
15
16
Scale out
Buy more hardware Load balance on several servers Especially if the load is the problem Requires cache invalidation and file sync Session state (are you using it?)
- State Server or SQL Server
17
See Marek Blotnys excellent blog post on EPiServer 5 vs. EPiServer 4.61
- CMS 5 scales much better
18
Important Tools
Fiddler
JetBrains DotTrace
WebLoad / Jmeter / WAPT Load Testing log4net Trace Diagnostics IIS Diagnostics ASP.NET Viewstate Helper Performance Viewer (Windows) LogParser & Visual Log Parser IIS Traffic Monitor
19
Special offer to all EPiServer Developer Summit 2008 attendees Extended trial period (10 30 days) Offer lasts for 30 days from now!
b4zLrhD/g23bNieHrY8oV6EIezUiCzad
20
Misc...
21
Release Mode
Compile the site in Release Mode (in VS) <compilation debug=false /> in web.config This will give you ~10% performance gain ASP.NET will not time out with debug = true
- Just as important as the performance gain
22
Enterprise Gotcha
Same source code, many different web sites
- One place to deploy code - One config file to update
But...
- Config changes will restart all sites
This is heavy lifting!
23
24
IIS Settings
Log more
- Review the IIS log settings. Turn on most log settings - Remember time-taken
Web Gardens
- No, no and no! It can actually hurt performance
25
Minimize Viewstate
Think Green - Save Bandwidth
www.binaryfortress.com/aspnet-viewstate-helper
27
Links
Performance Tuning and Optimization of EPiServer CMS (Fredrik Haglund) EPiServer 5 vs. EPiServer 4.61 part I - GetPage() (Marek Blotny) The challenges of a high traffic site with EPiServer (Adam Najmanowicz) Performance Pitfalls in EPiServer (Mats Hellstrm) The Output Cache - When and Why (Daniel van den Tempel) Caching Custom Data in EPiServer EPiServer Labs
28
29
http://niknak.org/software/IIsTrafficMonitor
30
31
32