heavy processing tasks
Hi Guys,
I've a task that runs every 10 mins executing the below code, but the issue is that it slowing the system down affecting other processes, so is there a way to maybe spread the execution of this so it doesn't slow down the system? I've tried spreading these fucntion in two different tasks but doesn't seem to change much.
Method OnTask() As %Status
{
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("20779")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21822")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21147")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21145")
J ##class(MSDS.Common.ConditionMonitoring).GetKitList("21816")
Q $$$OK
}
Thanks
Comments
You may slow a bit your process, to leave some process time to other processes.
to do so, you would need to use hang command, somewhere in the loop, with some small value such as 0.1 seconds, and depends how fast is your process may do it once per 100 iterations or more
Hi,
without understanding what workload the job is doing its nearly impossible to suggest best approach.
You could try to reduce the priory of the jobbed process.
d %SYSTEM.Util.SetPrio("-1") //reduced prio of current process by one
Thanks Guys
Maybe this can help:
You can use the BatchFlag()Opens in a new tab method to establish a process as executing in batch mode. A batch mode process has a lower priority than a non-batch process.
https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls…