Documentation Center

Debugging server-side caching

Debug caching to find out if adding more memory to your system could improve performance. To debug caching, configure a separate log in your logback.xml file and examine its output.

About this task

This topic is based on the SDL Tridion World Article "Analyzing the Tridion Object Cache" by Frank van Puffelen (found at http://sdltridionworld.com/articles/sdltridion2011/analyzing_object_cache.aspx).

Procedure

  1. In the WEB-INF/classes/ (JSP) or bin\config\ (.NET) folder of the Web site you want to optimize, open the file logback.xml for editing.
  2. Add a new <appender> element for a new caching log file. You can copy one of the existing <appender> elements.
  3. Set the name attribute of this appender to a new, unique name, for example, rollingCacheLog.
  4. In the <fileNamePattern> subelement, modify the base value of the file name pattern (for example, cd_core) to a new, unique string (for example, cd_cache).
  5. Add a new logger element that looks as follows:
    <logger name="com.tridion.cache" level="DEBUG">
    	<appender-ref ref="rollingCacheLog" />
    </logger>

    where rollingCacheLog is the name you gave to your new appender.

  6. Save and close logback.xml.
  7. Restart your Web site.
  8. Examine the log file in the configured location as the Web site is being accessed. In particular, check for frequent occurrences of the following strings in your log file:
    • maximum memory size exceeded
    • Remove node with key
    • reduced memory size to

    These strings indicate moments when the cache fills up and old items are expunged. If you encounter these strings frequently in the log file, your cache is probably too small. Configuring more caching memory in your Storage Layer configuration file, cd_storage_conf.xml, can improve your performance.