CA Directory: Explanation on CPU Starvation Detectecd message

Document ID : KB000110666
Last Modified Date : 10/08/2018
Show Technical Document Details
Question:
You may see following message popup in ALARM log of CA Directory 12.6 and higher version of DSA and wonder what it means.
You already found information on this in docops but it is not clear how the calculations are made.

e.g.
ALARM log will show:
[64] 20180720.135601.560 DSA_E3730 CPU Seconds 13 has fallen below threshold 55, CPU starvation detected

At the same time, the STATS log will show:
[64] 20180720.135601.560 STATS : Assocs 108 NilCredit 0 Queue 3+3 MWQ 3/3 Active 261 Ops 3361 Entries 376851 Mem 153/17484 CPU Seconds 13/60 CPU kTicks 3
 
Answer:
There are two logs you might want to look at.
ALARM log and STATS log of the DSA to understand how it all works and calculated.

We have scheduler in dxserver which will increment a parameter (cpustats)  by 1 for every one second. At the end of 60 seconds, dxserver will check this parameter.
 
In ideal case, i.e. when cpu is allocating enough time to dxserver, the value of cpustats   should be 60 in 60 seconds and stats log indicate would be  60/60
 
Suppose for some reason if cpu is not  allocating enough time, the counter of   cpustats   will go less than 60 and stats log will indicate something like  13/60.
 
In above example, in last 60 seconds , cpu has given only 13 seconds for dxserver.
 
Coming to configuration:
set cpu-starvation-threshold = <num>;
 
this parameter will let dxserver know, when to log a warning messages in wan log.
 
Default value is 5, for example when cpustats goes less than 55(60-5), dxserver will log an entry in warn log.
 
If we have 56/60 in stats log, it will not log any waring messages
If we have 53/60 in stats log, then it will make an entry in warn log such as "CPU Seconds 53 has fallen below threshold 55, CPU starvation detected" 
 
The value 55 in warn log will be constant, is based on what we configure "cpu-starvation-threshold" parameter. In above example we set 5 so the value would be 60-5 =55
 
If you set this parameter to 20, and cpustats goes less than 40, dxserver will log an entry in warn log.
 
CPU Seconds 33 has fallen below threshold 40, CPU starvation detected and at the same time STAT log will report "CPU Seconds 33/60"
 
Hope above explanation has provide you good understanding on how to read cpu starvation message.