Review request JMC-6512: for Competing CPU load rule should take overall load into account

Jie Kang jkang at
Thu Jun 27 21:38:12 UTC 2019

Hi Florian,

Changes look mostly good.

# I have some suggestions and comments below:

* The Messages also contain:

CompareCpuRule_INFO_LIMIT=Competing CPU usage limit
CompareCpuRule_INFO_LIMIT_LONG=The amount of CPU used by other
processes needed to trigger an info notice
CompareCpuRule_WARNING_LIMIT=Competing CPU usage warning limit
CompareCpuRule_WARNING_LIMIT_LONG=The amount of CPU used by other
processes needed to trigger a warning

I think this patch should also alter these descriptions to reflect the
new calculation behind the rule.  To be honest I'm not sure how to
describe the new meaning succinctly in words, otherwise I'd provide a
suggestion, sorry;

# The following comments could be addressed in different Jira issues, if at all:

* The SpanToolkit is used twice on the items now, once for the max and
once for the ratio. Could the underlying iterations over the items be
combined? I understand they calculate different spans, one of which is
used in the message while the other is used for the score. Could they
be aligned?

* It's curious that the SpanToolkit is given the warning limit whereas
the long message is generated if the score is above the info limit. As
well, the warning limit is used to determine if spans get combined
while the end result used for the score process is the longest span,
regardless of it's value's relation to the warning limit. Should it be
the longest span that's above the warning limit, if possible,
otherwise the longest span? I guess it depends on if the initial spans
vary in length or not. I'm not sure how to describe it but something
feels strange here.

# The following is just a question for the intended design:

* After an initial read of these changes, I would expect that if I set
a warning limit of say 0.4, then a warning would be triggered if there
is a longest span where the CPU usage of other processes was 40% and
the total CPU usage was 100% I.e. the range is like [1]? Is that

x*y<LIMIT, 0<=x<=1, 0<=y<=1, x<y
x: CPU Usage of Other Processes over the longest span of time
y: CPU Usage of All Processes over longest span of time


On Thu, Jun 27, 2019 at 5:34 AM Florian David <florian.david at> wrote:
> Hi all,
> Please review this fix for the CPU load rule.
> Webrev:
> Regards,
> Florian

More information about the jmc-dev mailing list