Set processor affinity for scom agent

Problem

SCOM agent tasks are consuming 100% processor time causing a slow reaction time on servers.

Solution

Force SCOM agent processes to run on one CPU-core so other tasks get processor time.
To achieve this add a scheduled task running the following script every 5 minutes to force processes to run on one core . Here on core 2.
You have to run this job frequently as SCOM is starting new processes every now and then.

This is a simple way to reduce load after max 5 Minutes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$processes = get-process
foreach ($process in $processes)
{
            $procid = $process.ID
            If ($process.ProcessName -eq "HealthService")
            {
                        $ScomProc = Get-Process -id $procid; $ScomProc.ProcessorAffinity=2
 
            }
            If ($process.ProcessName -eq "MonitoringHost")
            {
                        $ScomProc = Get-Process -id $procid; $ScomProc.ProcessorAffinity=2
            }
 
}
Print Friendly, PDF & Email
This entry was posted in Fix IT and tagged , . Bookmark the permalink.

Comments are closed.