fenced_pool - Maximum number of fenced processes configuration parameter

This parameter represents the number of threads cached in each db2fmp process for threaded db2fmp processes (processes serving threadsafe stored procedures and UDFs). For non-threaded db2fmp processes, this parameter represents the number of processes cached.

Configuration type
Database manager
Applies to
  • Database server with local and remote clients
  • Database server with local clients
  • Partitioned database server with local and remote clients
Parameter type
Configurable online
Default [range]
-1 (max_coordagents), Automatic [-1; 0-64 000]
Unit of measure
  • If this parameter is updated dynamically, and the value is decreased, the database manager does not proactively terminate db2fmp threads or processes, instead it stops caching them as they are used in order to reduce the number of cached db2fmp's down to the new value.
  • If this parameter is updated dynamically, and the value is increased, the database manager caches more db2fmp threads and processes when they are created.
  • When this parameter is set to -1, the default, it assumes the value of the max_coordagents configuration parameter. Note that only the value of max_coordagents is assumed and not the automatic setting or behavior.
  • When this parameter is set to AUTOMATIC, also the default:
    • The database manager allows the number of db2fmp threads and processes cached to increase based on the high water mark of coordinating agents. Specifically, the automatic behavior of this parameter allows it to grow depending on the maximum number of coordinating agents the database manager has ever registered, at the same time, since it started.
    • The value assigned to this parameter represents a lower bound for the number of db2fmp threads and process to cache.

Recommendation: If your environment uses fenced stored procedures or user defined functions, then this parameter can be used to ensure that an appropriate number of db2fmp processes are available to process the maximum number of concurrent stored procedures and UDFs that run on the instance, ensuring that no new fenced mode processes need to be created as part of stored procedure and UDF execution.

If you find that the default value is not appropriate for your environment because an inappropriate amount of system resource is being given to db2fmp processes and is affecting performance of the database manager, the following procedure might be useful in providing a starting point for tuning this parameter:
   fenced_pool = # of applications allowed to make stored procedure and 
   UDF calls at one time

If keepfenced is set to YES, then each db2fmp process that is created in the cache pool will continue to exist and will use system resources even after the fenced routine call has been processed and returned to the agent.

If keepfenced is set to NO, then non-threaded db2fmp processes will terminate when they complete execution, and there is no cache pool. Multithreaded db2fmp processes will continue to exist, but no threads will be pooled in these processes. This means that even when keepfenced is set to NO, you can have one threaded C db2fmp process and one threaded Java™ db2fmp process on your system.

In previous versions, this parameter was known as maxdari.