agentpri - Priority of agents configuration parameter

This parameter controls the priority given to all agents and to other database manager instance processes and threads by the operating system scheduler. This priority determines how CPU time is allocated to the database manager processes, agents, and threads relative to other processes and threads running on the machine.

Important: The agentpri database manager configuration is deprecated. It can still be used in pre-version 9.5 data servers and clients. Also, agent priority for the WLM service class is discontinued. Start to use the WLM dispatcher capability instead of agent priority. For more information, see Agent priority of service classes is discontinued.
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
Default [range]
-1 (system) [ 41 - 125 ]
Other UNIX
-1 (system) [ 41 - 128 ]
-1 (system) [ 0 - 6 ]
-1 (system) [ 0 - 59 ]
-1 (system) [ 1 - 99 ]
-1 (system) [ 0 - 31 ]

When the parameter is set to -1 or system, no special action is taken and the database manager is scheduled in the normal way that the operating system schedules all processes and threads. When the parameter is set to a value other than -1 or system, the database manager will create its processes and threads with a static priority set to the value of the parameter. Therefore, this parameter allows you to control the priority with which the database manager processes and threads (in a partitioned database environment, this also includes coordinating and subagents, the parallel system controllers, and the FCM daemons) will execute on your machine.

You can use this parameter to increase database manager throughput. The values for setting this parameter are dependent on the operating system on which the database manager is running. For example, in a Linux or UNIX environment, numerically low values yield high priorities. When the parameter is set to a value between 41 and 125, the database manager creates its agents with a UNIX static priority set to the value of the parameter. This is important in Linux and UNIX environments because numerically low values yield high priorities for the database manager, but other processes (including applications and users) might experience delays because they cannot obtain enough CPU time. You should balance the setting of this parameter with the other activity expected on the machine.

  • If you set this parameter to a non-default value on Linux and UNIX platforms, you cannot use the governor to alter agent priorities.
  • On the Solaris operating system, you should not change the default value (-1). Changing the default value sets the priority of Db2® processes to real-time, which can monopolize all available resources on the system.

Recommendation: The default value should be used initially. This value provides a good compromise between response time to other users/applications and database manager throughput.

If database performance is a concern, you can use benchmarking techniques to determine the optimum setting for this parameter. You should take care when increasing the priority of the database manager because performance of other user processes can be severely degraded, especially when the CPU utilization is very high. Increasing the priority of the database manager processes and threads can have significant performance benefits.