Web Content Management Performance
General Tips
- Ensure that the WCM server is upgraded to latest version to take advantage of performance fixes
- For your chosen WCM version, apply the recommended Performance and Syndication fixes
- Actively resolve all errors (security, missing components etc) found within the Portal logs
- Avoid having a Homepage larger than 80 Kb
- Use Pre-Rendering, Servlet-Caching (eg. Dynacache) or Web Content Management Basic Caching where possible to speed up the rendering of static content
- If not using the WCM AuthorTime Search or PDM Search (Portal Search does not apply), disable the JCR Search Indexer
- If using Portal Search, consider using a dedicated server for the crawler and indexer and disable the local Search crawler (from within the Portal Search Administration)
- If you are not using Portal Search, disable the Search crawler
- Where many menus/navigators on a page cant be avoided, avoid viewing those pages to verify new content has been added, instead utilise dummy pages with a max of 1 or 2 menus/navigators on them
- Don't syndicate All Items unless necessary, use All Live Items instead
- Don't display single large images, break into multiple smaller images
- Don't mix cacheable and non-cacheable items on the same page
- Apply JCR iFix PK48881 and PK52234 for WPS/WCM 6.0.1 or 6.0.1.1
- Apply WCM iFix PK51452 for WCM 6.0.1.1
- Use a ratio of at least 5 to 1 Database Connections to WAS WebContainer threads (for the Portal Server running WCM)
WCM with DB2
- Periodically run the recommended reorg and runstats commands
- Consider changing the DB2 query level to 2 (for the JCR Database)
- Consider using binary collation (as the default collation used in the JCR can have major performance issues under DB2)
Using binary collation will cause ordering within the Web Content Management Authoring UI, Menus and Personalisation Rules to be case sensitive and words with accent and/or non-English characters will also be ordered incorrectly
This is difficult and time consuming to enable / disable
WCM with Oracle
- Upgrade to Oracle v10.2.0.4 when available. In the meantime use Oracle v10.2.0.3, with Oracle patch for bug 4724074.
- Disable the following optimizations...
alter system set "_b_tree_bitmap_plans" = FALSE;alter system set "_optimizer_cost_based_transformation" = OFF;
Running database statistics periodically is critical to ensuring database performance over the long term...
execute dbms_stats.gather_database_stats(dbms_stats.auto_sample_size, method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO', cascade=>TRUE);For WCM versions 6.0.0.0 - 6.0.1.1 only (6.0.1.2 will include these indexes automatically), make the following indexing changes:
- Remove the following indexes
JCR.IDX1466, JCR.IDX1251, JCR.IDX1120, JCR.IDX1226, JCR.IDX1502, JCR.IDX1536, JCR.IDX1146, JCR.IDX1576, JCR.IDX1276, JCR.IDX1201, JCR.IDX1301, JCR.IDX1176, JCR.IDX1461, JCR.IDX1246, JCR.IDX1115, JCR.IDX1221, JCR.IDX1497, JCR.IDX1531, JCR.IDX1141, JCR.IDX1571, JCR.IDX1271, JCR.IDX1196, JCR.IDX1296, JCR.IDX1171, JCR.icmstjcrwsnodesix5, JCR.DRAFTAUTHINDEX1, JCR.DRAFTAUTHINDEX2, JCR.et01Add the following indexes:
INDEX NAME DATABASE TABLE ATTRIBUTES JCR.IDX1466 JCR.ICMUT01753001 ATTR0000001092
itemid
versionidJCR.IDX1251 JCR.ICMUT01569001 ATTR0000001092
itemid
versionidJCR.IDX1120 JCR.ICMUT01459001 ATTR0000001092
itemid
versionidJCR.IDX1226 JCR.ICMUT01549001 ATTR0000001092
itemid
versionidJCR.IDX1502 JCR.ICMUT01775001 ATTR0000001092
itemid
versionidJCR.IDX1536 JCR.ICMUT01798001 ATTR0000001092
itemid
versionidJCR.IDX1146 JCR.ICMUT01481001 ATTR0000001092
itemid
versionidJCR.IDX1576 JCR.ICMUT01830001 ATTR0000001092
itemid
versionidJCR.IDX1276 JCR.ICMUT01593001 ATTR0000001092
itemid
versionidJCR.IDX1201 JCR.ICMUT01529001 ATTR0000001092
itemid
versionidJCR.IDX1301 JCR.ICMUT01613001 ATTR0000001092
itemid
versionidJCR.IDX1176 JCR.ICMUT01509001 ATTR0000001092
itemid
versionidJCR.IDX1461 JCR.ICMUT01753001 ATTR0000001318
itemid
versionidJCR.IDX1246 JCR.ICMUT01569001 ATTR0000001318
itemid
versionidJCR.IDX1115 JCR.ICMUT01459001 ATTR0000001318
itemid
versionidJCR.IDX1221 JCR.ICMUT01549001 ATTR0000001318
itemid
versionidJCR.IDX1497 JCR.ICMUT01775001 ATTR0000001318
itemid
versionidJCR.IDX1531 JCR.ICMUT01798001 ATTR0000001318
itemid
versionidJCR.IDX1141 JCR.ICMUT01481001 ATTR0000001318
itemid
versionidJCR.IDX1571 JCR.ICMUT01830001 ATTR0000001318
itemid
versionidJCR.IDX1271 JCR.ICMUT01593001 ATTR0000001318
itemid
versionidJCR.IDX1196 JCR.ICMUT01529001 ATTR0000001318
itemid
versionidJCR.IDX1296 JCR.ICMUT01613001 ATTR0000001318
itemid
versionidJCR.IDX1171 JCR.ICMUT01509001 ATTR0000001318
itemid
versionidJCR.WCMINDEX001 JCR.ICMUT01459001 ATTR0000001312 JCR.WCMINDEX002 JCR.ICMUT01709001 ATTR0000001312 JCR.WCMINDEX003 JCR.ICMUT01798001 ATTR0000001312 JCR.WCMINDEX004 JCR.ICMUT01709001 ATTR0000001373 JCR.WCMINDEX005 JCR.ICMUT01822001 ATTR0000001383 JCR.WCMINDEX006 JCR.ICMSTJCRWSNODES IID
WSID
STATUSJCR.WCMINDEX007 JCR.ICMSTJCRWSNODES IID
WSID
STATUS
VID
CTID
UUID
COMPIDJCR.WCMINDEX008 JCR.ICMSTJCRWSNODES IID
WSID
STATUS
VIDJCR.WCMINDEX009 JCR.ICMSTJCRLINKS WSID
INLEAFTREEFLAG
TVID
TCTID
TIID
LIDJCR.WCMINDEX010 JCR.ICMUT01459001 ATTR0000001092
ATTR0000001318
ATTR0000001335
ITEMID
VERSIONIDJCR.WCMINDEX011 JCR.ICMSTJCRLINKS WSID
INLEAFTREEFLAG
TIID
SIID
LID
SVID
TVID
TIX
TCTID
TNAME
TNSIDJCR.WCMINDEX012 JCR.ICMUT01731001 ATTR0101600121 JCR.WCMINDEX013 JCR.ICMSTRI001001 targetItemID
sourceItemID
sourceVersionIDJCR.taw_1459_c JCR.ICMUT01459001 ATTR0000001335
itemid
versionidThe database should be re-tuned (runstats/reorg) after adding indexes
WCM with LDAP
- Use a dedicated server
- Monitor CPU activity of the LDAP server and add additional hardware as required
- Perform tuning as indicated in LDAP products documentation
- Avoid too many nested groups
Optimizing Menu Components
- Avoid too many search criteria (in Menu Element Query section)
- Avoid utilizing the options in the Further options section for each criteria unless really necessary, as this stops the menu from being internally cached
- For Category and/or Site Area restricted menus, only select both Ancestors and Descendents if really necessary and limit the number of categories and site areas specified
- Disable sorting by Description unless really required (set the value to one of the other sort fields to disable)
- For unsecure sites (where content is accessed anonymously or always accessed by the same user, eg. Administrator), set Maximum pages to include and Pages to read ahead to 1
- If using multiple libraries, ensure that at least a site area is selected in each menu otherwise the menu will search against all libraries
Optimizing Navigator Components
- Only select both Ancestors and Descendents if really necessary
- For unsecure sites (where content is accessed anonymously or always accessed by the same user, eg. Administrator), set Maximum pages to include and Pages to read ahead to 1
Optimizing Portal Personalization Rules
- Avoid having too many rules based off authoring template elements as they dont perform as well as rules that utilise standard metadata (such as keywords and categories)
Optimizing Syndication
- Set the subscriber.only property to true in WCMConfigServices.properties for all Workplace Web Content Management instances that will not syndicate their repositories to other servers.
- Avoid having too many Subscribers linked to the one Syndicator
Optimizing WCM Versioning
- Consider disabling Versioning for all items on both authoring and rendering servers
- Consider disabling syndication of versions
Optimizing Authoring Templates
- A well designed Authoring Template is a prerequisite to achieving optimal WCM authoring performance.
- For optimal performance of authoring actions, it is recommended to limit the number of elements to 10 - 15 elements.
Optimizing Applications that use the WCM API
- Cache the Workspace object for each user in the session Call Workspace.login and Workspace.logout around all WCM API method calls that will execute within the current request Consider caching the results of JSPs using servlet-caching or WCM caching
Optimizing WCMs Internal Caches
- WCM has various internal caches that store frequently accessed data fragments (not entire rendered pages).
- By default these caches have a maximum size of 2000 items, however during performance tuning you may want to try increasing the size of them:
abspath services/cache/iwk/abspath Stores the path to sites, siteareas and content abspathreverse services/cache/iwk/abspathreverse Stores the path to sites, siteareas and content (in reverse) menu services/cache/iwk/menu Stores the results of cacheable WCM menus nav services/cache/iwk/nav Stores the results of cacheable WCM Navigators strategy services/cache/iwk/strategy Stores fragments of WCM objects (ie. Provides a caching layer over the repository) summary services/cache/iwk/summary Stores summary information about WCM objects (used throughout the Authoring UI and API) - Go the the Resources \ Cache Instances \ Object Cache Instances section of the WebSphere Admin Console, to change the size of any caches
Scaling Authoring Servers
- Cluster the authoring server
- Libraries can be used to distribute content and design elements within a single server
- Database monitoring and tuning is essential for large websites and/or those with heavy rendering loads
- Avoid many subscribers pointing to the authoring server
- Add more hardware (CPUs / RAM)
Scaling Rendering Servers
- Load Balance the rendering server
Horizontal cluster Add additional servers (HW fail-over) Vertical cluster Add additional instances (JVM heap size) - Consider caching or pre-rendering
- Use local rendering rather than remote rendering
- Design your web site to maximise performance and scalability
- Libraries can be used to distribute content and design elements within a single server
- Database monitoring and tuning is essential for large websites and/or those with heavy rendering loads
- Add more hardware (CPUs / RAM)
Caching
If the Site is not personalised and is never going to be personalised use the Pre-Renderer or Servlet-caching with Edge Server
If the Site is a mixture of personalised and nonpersonalised content and if you only want to cache your non-personalised content use Servlet caching
If you want to cache both personalised and nonpersonalised content use either WCM Content Caching solely or a combination of it and Servlet caching
If the Site is all personalised (or will be in the future) use WCM Content Caching
WCM Content Caching
If content is not personalised use Basic Caching or the Site Advanced cache type so every user can access the same cached items
If content is personalised:
- If content is unique for different groups of users use the Secured Advanced cache type so users that belong to the same groups will access the same cached items
- If content is unique for different personalization profiles use the Personalized Advanced cache type so users that share the same personalization profile will access the same cached items
- If content is unique for every user use the User Advanced cache type so every user gets its own cached items
- If content is unique for every session use the Session Advanced cache type so every session gets its own cached items
Cache Management: Handling textual changes
While the cache expiry and pre-rendering interval should be set adequately to handle normal updating of content, there may be times where an unplanned textual change needs to go through
- WCM Content Caching
Flush the WCM Content Cache
- Servlet-Caching
Option 1: Use the CacheMonitor web application to flush the required page and then optionally re-render the page to force it into the cache (to avoid next user getting a performance hit)
Option 2: Use the Dynacache API (DynamicCacheAccessor) to flush the required page and then optionally re-render the page to force it into the cache (to avoid next user getting a performance hit)
- Pre-Rendering
Use the CacherModule to flush the required pages and then re-request them via the same module
Flush the specified page...
<URL_TO_PAGE>?MOD=CacherModule&SRV=flushPageCache&library=<LIBRARY_NAME>Pre-render the specified page
<URL_TO_PAGE>?MOD=CacherModule
Auto-Loading the WCM Content and Servlet Caches
All websites that utilise WCM Content or Servlet caching should consider autoloading the cache whenever the cache is flushed or the server restarted (for memory based caches)
A simple way of auto-loading the cache is to create a HTML page that includes an iFrame for each page you wish to load. Upon rendering that page, each iFrame will load thus loading every page into the cache
Another approach is to use the Java URLConnection class to programmatically open a URL connection to each page you want to cache. This approach is more complicated then the previous one but might be more flexible if you want to tie various start-up commands together
Auto-Refreshing the Cache (Single Server Environments)
If your website has a requirement for rapid deployment of content and a high performance requirement that precludes the use of a small expiry/pre-render interval (which is the recommended approach), then you may need to look at ways to auto-refresh the cache (when content changes)
One such strategy is to use the WCM API code together with two special workflow stages after published, one that indicates that the cache needs refreshing and another that indicates that the cache is refreshed.
The WCM API code would poll for new content objects within the first new workflow stage then automate the relevant steps in the Handling Emergency Textual changes section depending on the chosen type of cache and finally push the content objects to the second workflow stage
If you additionally want to handle profiling and name changes, then your API code will need to find all references to the current item and refresh them as well.
If a referrer is a library component (eg. menu or navigator), then you will additionally need to refresh all referrers of the library component
Auto-Refreshing the Cache (Multi Server Environments)
Auto-refreshing the cache (when content changes) within multi-server environments is difficult as we cant utilise workflow to identify which items should be refreshed and we cant hook into the Syndication engine to determine which items changed
In this scenario is recommended to periodically flush and re-load the cache using the methods described previously
If your pre-rendering, then you could run the refresh on the on the authoring server (like a single server) then copy the refreshed items to the web server
Separate Content and Design Editing
If a separate design editing environment and/or design reviews (separate from content creation) are required, then the following split authoring server approach should be considered..
Advanced Previewing of both draft content and design
The following diagram shows how to perform advanced previewing of both content and design...