|
WLM provides queue/server management application interfaces which allow applications to pass work requests from an application daemon to server address spaces which process the requests. WLM internally queues the work requests based on the classification to service class queues and manages the server regions based on the goal definitions for the service classes, the goal achievement, and the demand. DB2 is one example which exploits these interfaces for getting management of their stored procedures address spaces by WLM. In order to allow WLM to manage the server address spaces, you have to define an application environment and must provide the start procedure that is used by WLM to start the server regions. From a DB2 perspective, a WLM application environment encapsulates a certain DB2 function or a set of DB2 stored procedures (STP) with similar characteristics.
The queue/server management algorithms rely on the fact that the single work requests are independent of each other. This is not true for STPs that call another STP and wait for that STP to complete (recursive calls) or that are called by DB2 User Defined Functions (UDF) that in turn call multiple STPs (quasi-parallel calls).
Each STP is processed under a server task in the WLM-established stored procedures address space. For recursive calls, a server task waits for the completion of the STP it called, that is, it is suspended. In case of quasi-parallel calls, it is DB2 that wakes up the server tasks but there is only one active task at a time while the others are suspended.
For the initial work request to finish, all subsequently called work requests have to be selected by server tasks. It is possible that WLM does not start additional server address spaces because it does not recognize that a problem exists. When service class goals are met, WLM does not have to start additional server address spaces. Because the suspended tasks do not consume resources and the dependency between the work requests is unknown, WLM can project that adding more resources in form of additional server address spaces does not help.
With the enhancements for WLM-established stored procedures, when DB2 inserts a work request it informs WLM if a dependency to other work already in progress exists or not. WLM does recognize such situations and helps these applications by adding server address spaces as long as the system resources and the service class goals support this.
Note that the enhancement described is optional and currently only exploited by DB2 for stored procedures.
|