Monitor Processes Thread Efficiency Improvements
For some monitor batch processes, the number of records to process is unpredictable and can range from zero to a few to many records. Submitting these batches with a fixed number of threads that fits the higher volumes of records means wasting threads with each run.
When there is no data to process, monitor batch process are now enhanced to not create any batch run or any of the thread level artifacts associated with a batch run. The batch job submission record is completed as usual, but it indicates that no batch run was needed.
In addition, a new optional batch parameter Minimum Records per Thread is available for monitor batch processes that allows some batch controls to indicate that the number of threads should be calculated dynamically based on the number of records to process. If it is not provided, the batch works as it currently does. There is no adjustment of the requested thread number. If the parameter is specified, the requested number of threads may be adjusted based on actual record count. The adjusted number of threads will not exceed the requested number and can only be reduced based on the new batch parameter.
For example:
- If the monitor batch is submitted with 100 threads, the parameter is set to 50 records per thread, and there are 1M records to process, then there is no change to the number of allocated threads.
- If the monitor batch is submitted with 100 threads, the parameter is set to 50 records per thread, and there are 109 records to process, then the number of threads allocated is set to 3.
There is no change to monitor processes that have data to process. Thread adjustment is only applied when explicitly requested using the new batch parameter on specific monitor batch controls.
With these enhancements, batch artifacts and thread resources for monitor processes are only allocated when there is something to process. These resources can be optionally tuned to correlate with the volume to process, and not by fixed number of threads that is aimed at higher volumes.
Steps to enable and configure
Complete these steps:
- Identify the monitor batch controls that may benefit from a dynamic thread number adjustment.
- Populate the new Minimum Records per Thread batch parameter on these monitor batch control as per your business needs.
Tips and considerations
With this enhancement, a batch run record for a monitor batch process will not be created when there is no data for the batch to process. In this situation, the batch job submission record indicates that a batch run was not needed using a new new "No Processing Needed" F1_NO_PROC_NEEDED column added to the Batch Job table.
If there are some custom procedures that rely on the batch run record to exist even when there is no data to process, then these procedures should be adjusted to rely on the new column added to the Batch Job table instead.
NOTE: For an on-premise installation, batch processes may be submitted via the command line. That is, without creating a batch job submission record. In this situation, a monitor batch run will still be created even if there is no data to process because without a batch job record there is no way to communicate the reason for not creating a batch run.