In today's blog I will outline how to optimize performance in the Web Content Manager authoring environment.
The recommended Digital Experience topology contains an authoring environment separate from the rendering environment.
The main reasons for that are different use cases and performance:
- On a rendering environment WCM advanced or basic caching as well as fragment caching is recommended to have the best performance for a large amount of users accessing the environment. In difference to that on the authoring environment a small amount of users needs to see updates right away and therefore the caching is either disabled or a short timeout is set.
- On the authoring environment the write operations are the main focus and typically versions are kept, many drafts and non live content is being used. On the rendering environment for best performance for read operations the overhead of drafts, expired content, versions should be avoided.
- The constant update operations on authoring invalidate caches frequently what negatively effects the performance of readers and should be avoided for best rendering performance.
- Keeping a change log for syndication is common in authoring and makes sense there with the updates but is disabled on rendering (deployment.subscriberOnly=false in WCM WCMConfigService). Frequently syndication happens to lower environments from authoring while this would not happen on a rendering environment.
- On a rendering environment one can enable light mode loading (aka lazy load) for the WCM authoring portlets and Rich text editor apps for best startup performance while on authoring not all functional portlets are needed.
- On a rendering environment analytics and monitoring have a higher priority than on authoring - in many cases they can be disabled.
- On the authoring environment JCR text search is important so authors can find the content they want to edit while on rendering the rendering search is relevant. JCR text search has a performance impact.
As outlined above the authoring environment has different configuration requirements and limited caching - that makes the tuning different.
The most important aspects are:
- WCM Maintenance:
Purging deleted content, removing old versions, deleting expired content, member fixer for users and groups that do not exist any more are crucial to run frequently as they accumulate data in the database and slow down read and write operations. See the following article for more information on WCM Maintenance: https://www.ibm.com/developerworks/community/blogs/portalops/entry/Web_Content_Manager_content_maintenance?lang=en
The Query to find which JCR nodes are versions has changed with version 8.5 and 9:
Finding the nodes per workspace:
SELECT COUNT(1) AS NODE_COUNT, WSID FROM <schema>.ICMUTSWIDE0 WHERE WSID > 0 GROUP BY WSID
Finding the workspaces:
SELECT WSID,WSNAME FROM JCR.ICMSTJCRWS WHERE WSID > 0 ORDER BY WSID
-> The nodes in jcr:versioning and any _v workspace for virtual portals represent the version nodes.
- Cleanup of content:
Besides the cleanup of versions, expired content, ... a frequent item that increases the load is old content that is not expired but is no longer needed. It is returned in many queries but with sorting in menus or PZN components is so far to the back that no user pages that far. It can help to manage old content via policies - e.g. enforcing a expiry of content every 1 year.
It is also possible to use the WCM APIs to find content that has not been updated in a while - the findContentModifiedBetween API only returns content modified between a certain date - so to find content not modified since 2016 one could run a query from 1970 to 2016. For more details see the javadoc link:
- Database maintenance and optimization:
See the Portal tuning guide for the db tuning setting details. Ensure sufficient memory is available and that the bufferpools are tuned (ideally unlimited).
Identify slow running queries with the database team and add indexes as needed.
- Reduce load on the database:
- If possible configure caching (fragment, WCM advanced or basic) for a short period.
- Follow the best practises for WCM Menus and PZN components.
- For PZN queries the performance can be increased by removing links from the result set via the configuration rulesEngine.bypassWebContentLink=true in PersonalizationService.properties in the profile of each node.
- For WCM Menus the performnce can be increased by removing links from the result set via the configuration menu.includeContentLinks=false in WCM WCMConfigService.
- Reduce the amount of WCM rendering portlets per page.
- Reduce the amount of data pulled back by e.g. setting a max amount of results or pages.
- Consider using asynchronous rendering for some of the WCM rendering portlets to provide a better user experience.
- If possible disable automatic versioning in WCM WCMConfigService.
- Consider using search and displaying results from search if a very rich filtering capability is required.