Written by

Question Nezla · Mar 19, 2023

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
{  
##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")

  $$$OK
 }
 

Thanks

Product version: Ensemble 2014.1

Comments

Dmitry Maslennikov · Mar 20, 2023

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

0
Timo Lindenschmid · Mar 20, 2023

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

0
Nezla · Mar 20, 2023

Thanks Guys

0