Tuning the System Cache
This topic is intended for a system administrator or developer audience.
Percussion using various caching mechanisms to help improve performance. These caches can be tuned to optimize their utilization to match the requiements of a specific implementation.
Second Level Cache
The second level cache is used to improve performance between Percussion and the back-end database that holds the Content Repository.
The cache configuration can be found in the following configuration file:
<InstallDir>/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/classes/ehcache.xml
An example entry defines a region of cache that matches to a particular dataset or type in the backend. For example:
<cache name="PSContentChangeEvent" maxElementsInMemory="657" eternal="true" overflowToDisk="false" />
Indicates a cache region for the table that stores the data used in Incremental publishing. In this example the cache can hold up to 657 entries, so as long as there are less than 657 entries in the table, they will only be pulled from the backend content repository once, and will be updated on changes.
This prevents round trips between the application and the back end database.
Auto Tuning The Second Level Cache
The system will auto tune the cache on startup after patch level 5315_20181221. Auto tuning can be disabled at startup by setting the PSAutotuneCacheStartup property to false in the <installDir>/rxconfig/Server/startupProcessManager.properties file. The feature is turned on by default.
The auto tuner will analyze the content of cacheable database tables and increase the number of maximum elements in the cache by the current row count plus 10%. The tuner analyzes free memory and will only use the percentage defined by the autotuneCachePercentage defined in the rxconfig/Server/server.properties file. The default is to allocate 40% of free memory to the second level cache. This value can be increased to allow for more content to be cached, 80% may be a more performant value.
The cache does use memory, so the -Xmx and -Xms values on thelax.nl.java.option.additional= line of the <installdir>/PercussionServer.bin.lax file, which controls the amount of memory allocated to Percussion, can be increased to provide more memory to the service and to the cache.
Manually Running the Auto Tuner
The Administrative Console has 3 additional commands that can help with tuning cache performance. This console can be accessed by visiting the following url on a Percussion server: http(s)://percussion:<port>/Rhythmyx/ui/admin
Available Commands
To run a command, type the command into the text box and click the submit button. To get a list of available commands you can use the command "help".
autotune cache
This command runs the auto tuner to tune the cache. This can be useful if you want to tune the cache when the system is under it's heaviest load to get the best possible values. A server restart is required before the tuned cache wil be applied.
dump cache
This command will output the current values that are in the cache and will show cache utilization statistics, including hitRate and memory usage.
flush cache
This command will clear the current cache from memory. It can be usefull when making direct database changes to the content repository with native SQL, as it forces Percussion to release what is cached in memory and then reload cacheable data from the database as it is requested.