Try OpenEdge Now
skip to main content
Database Administration
Maintaining and Monitoring Your Database : Change Data Capture : Using the CDC cache
 

Using the CDC cache

Performance of Change Data Capture (CDC) can be impacted by the size of the CDC cache.
To capture data changes in CUD operations, CDC triggers are embedded in the operations to inspect changed data and record them. The changes are processed according to user-defined CDC policies to determine if the change needs to be recorded and the level of detail. As CDC policies and their related meta-schema are frequently used information and not often changed, most of this information is stored in a shared cache, while some information is stored in users’ private cache to improve performance.
CDC cache is used by CDC triggers to improve performance when capturing data changes and writing captured data. While cached information and maintenance operations are internal, the CDC cache requires reserved shared memory to store the information, and is customizable users can use -cdcsize n to reserve it. A large cache size reduces the chance of eviction and paging that decrease performance. Allocate enough space to improve performance. For details on the-cdcsize parameter, see CDC cache size (-cdcsize).
The CDC cache allocation is split between a primary and secondary cache. The primary cache is read-only, and loaded with the CDC policies that exist at startup. All updates are performed in the secondary cache. The size of the primary cache is fixed at startup, and in most cases set to 75 percent of the specified size. If the remaining 25 percent is not enough space for the secondary cache, you can use PROUTIL INCREASETO to increase the size of the secondary cache online.
In CDC, each change needs to be captured to assure data integrity. The CDC cache aids the performance of CDC triggers. The CDC cache has the following attributes:
*Cached information is stored in shared memory.
*CDC-enabled tables have information stored in the cache whether the policies on the table is active and current or not.
*CDC triggers use the cache in forward processing for CUD operations.
*The CDC cache manager assures cached information is synchronized with policies changes.
*If eviction is necessary, out of date entries in the cache are evicted and replaced with new information when they are refreshed by a caller.
*For replacement, if the cache does not have room for a new entry, the Least Recently Used entry (LRU) is replaced with the new one.