Operating Mode
Processing log files and transferring the data to the BAM database can have a bit of an impact on the CPU load of a system. To mitigate any potential high loads, the BAM service has the capability of running in a more flexible operating mode to decrease its own load on the system.
There are 2 separate operating modes: Fixed and Adaptive, both apply to specific use case scenarios. Depending on the selected mode, the service selects the correct process priority in Windows when running. By default, the service runs in Fixed mode.
For more information on how to properly configure the service for this, consult the article Configuration.
For more information about the process levels themselves, check this blog post: How to Set Process Priority in Task Manager on Windows 10.
Fixed Mode
Just as the name states, the BAM service runs under a fixed process priority and by design that is the Normal priority.
Changing the priority can only be done via the Task Manager or similar tools. Also, without the use of specialised applications, the priority modification is only temporary and will be reset back to Normal when the BAM service is restarted.
Note
Modifying the process priority must be done with care. Choosing the wrong priority (even by accident) can have a potential effect on system stability.
Adaptive Mode
When the BAM service is running (or operating) in Adaptive
mode, it will monitor the CPU load
on a regular basis. Depending on the average load, it will change its own process priority according
defined load boundaries set in the Configuration file.
Warning
The use of this mode is still somewhat experimental, meaning the effects of automatically changing process priority on any of the job executions is not yet fully clear in all circumstances. If one of the jobs isn't behaving as expected, it is advised to set the operating mode back to Fixed and reach out to Ometa so that it can be investigated and the feature improved.
The load boundaries are defined within a range from 0% (zero) to 100%, cutting the full range in essentially 3 different parts. The parts with the accompanying process priority:
- 0 to lower boundary: Normal priority
- lower boundary to upper boundary: Below Normal priority
- above the upper boundary: Idle priority
Calculating the average CPU load is done by the following algorithm:
- Every 30 seconds a snapshot of the current CPU load is taken, and a progressive average is calculated.
- After 5 minutes, the service checks the average load at that moment and compares it with the defined range.
- The process priority is adapted accordingly if needed, and the steps 1 and 2 are repeated.
Please be aware that the lower the process priority the BAM service has, the slower its jobs will be executing. This can lead to a backlog of log files especially when a lot of new logs are generated by the rest of the Ometa framework services at a rate faster than they are processed.