This parameter indicates whether or not a DARI process is kept after a DARI call is complete. DARI processes are created as separate system entities in order to isolate user-written DARI code from the database manager agent process. This parameter is only applicable on database servers.
If keepdari is set to no, a new DARI process is created and destroyed for each DARI invocation. If keepdari is set to yes, a DARI process is reused for subsequent DARI calls. When the database manager is stopped, all outstanding DARI processes will be terminated.
Setting this parameter to yes will result in additional system resources being consumed by the database manager for each DARI process that is activated, up to the value contained in the maxdari parameter. This is only true when no existing DARI process is available to process a subsequent DARI call. This parameter is ignored if maxdari is set to 0.
Recommendation: In an environment in which the number of DARI requests is large relative to the number of non-DARI requests, and system resources are not constrained, then this parameter can be set to yes. This will improve the DARI performance by avoiding the initial DARI process creation overhead since an existing DARI process will be used to process the call.
For example, in an OLTP debit-credit banking transaction application, the code to perform each transaction could be performed in a stored procedure which executes in a DARI process. In this application, the main workload is performed out of DARI processes. If this parameter is set to no, each transaction incurs the overhead of creating a new DARI process, resulting in a significant performance reduction. If, however, this parameter is set to yes, each transaction would try to use an existing DARI process, which would avoid this overhead.