Memory allocation/leakage problems

Policy Agent allocates memory for many resources, such as:
  • Policy rules and actions
  • Sysplex Distributor lists and weight fraction arrays
  • Policy performance data arrays
  • LDAP search results

If it appears that Policy Agent is using too much memory, or memory leakage is suspected, use the following tools, possibly in conjunction with other tools outside the scope of Policy Agent, such as dump formatters and Language Environment® memory tracing.

Use the -m startup option to keep track of all Policy Agent memory allocation and free requests. All memory allocations are recorded in a memory trace buffer, and all memory free requests find the corresponding entry and remove it. If this option is specified, Policy Agent automatically reports any memory leakage at termination time, because any entries left in the buffer after all memory free requests have been processed are by definition memory leaks. Note that if the memory trace buffer fills up, the memory trace function is dynamically turned off and no more memory tracing is performed. If this occurs, specify a larger value for the -m startup option when Policy Agent is restarted.

Use the MODIFY MEMTRC command to log a snapshot of Policy Agent memory allocations. This command dumps the contents of the memory trace buffer to the log file. As a result, it only has an effect when the -m startup option was specified.

Use debug level 16 to record memory allocation and free requests inline in the log file. This debug level is independent of the -m startup option. Note that using this debug level can result in significantly more information being recorded, so specify larger and/or more log files using the PAGENT_LOG_FILE_CONTROL environment variable.