Back Forward Rule cache

The Process Commander engine maintains an in-memory cache of recently found rules to improve the performance of the engine, especially during rule resolution searches. This rule cache operates invisibly and automatically.

NoteDon't confuse the rule cache with the rules assembly cache, which covers only rules of the types that are translated to Java, and facilitates fast access to the compiled CLASS files.

To see whether the rules cache is enabled on your node and the date and time it was last initialized, review the Node Summary area of the Performance tool full details display.

Review the Database Access Counts area of that display to assess the fraction of rules read in your requestor session that was accessed from the rule cache rather than through PegaRULES database reads.

Use the DB Trace tool to assess the effectiveness of the rule cache for the whole node, in detail.

Determining the current size

Use the System Management Application to view the current rule count and size in bytes of the rule cache. GRP-375

  1. From the Designer Studio, start the System Management Application using> System > Tools > System Management App. You may be prompted for a username and password.
  2. Select a node.
  3. Click Memory Management from the SMA left menu strip. In the right panel, locate the table row labeled Rule Instance in the Caches group.

Changing the maximum size

To see a current rule count and the size in kilobytes of the rule cache, start the System Management Application (> System > Tools > System Management App), select a node, and click the Memory Management menu item. Look for the row labeled Rule Instance in the Cache grouping.GRP-371

To change the size of the rule cache, adjust the following prconfig Dynamic System Setting:

ERNSG 11/08 GRP-375

Dynamic System Setting: prconfig/cache/instancecountlimit/default

The prconfig/cache/instancecountlimit/default setting controls the number of rules allowed in the rule cache.

The following describes the valid values for this Dynamic System Setting:

Value Description

Integer. This value sets the maximum size of the rule cache in number of rules (not size in bytes) stored in the rule cache. If this setting is not defined, the default is 3,000 entries.

CautionChange this setting with care. Prconfig Dynamic System Settings can have broad impact on the operation of your system. See How to create or update a prconfig setting.

 

Detecting long waits

The PEGA0038 alert indicates that a requestor has waited longer than 30 milliseconds (or another threshold you can set in the prconfig.xml file) for access to the rule cache.

Disabling the Rule Cache

NoteAs a diagnostic aid to be used in specific situations, you can use the System Management application to temporarily disable the rule cache. This event is recorded in the Alert log as an alert of type PEGA0022. The corresponding alert when you re-enable the cache is PEGA0023. See Pega Developer Network articles PDNPRKB-25359 Understanding the PEGA0022 Alert and PRKB-25360 Understanding the PEGA0023 alert.

CautionUse this System Management facility only when necessary and for short intervals, as system performance is impaired when the rules cache is disabled.

OldIn older releases, the rule cache was sometimes called the instance cache, database cache, or system cache.

Definitions agent, alert log, DB Trace, lookup list, Performance tool, private RuleSet, pulse, rule resolution. static content
Related topics Understanding caching in Process Commander
How to detect that the wait time for rule cache access has exceeded a threshold
About the System Management application
Understanding Pega-RULES agent processing

Up Definitions — R