Perf-Alert: Plugin - CPU-usage is per core
-
Hi!
I am using the perf-alert-plugin to monitor, if a VM is exceeding CPU usage.
But: The plugin seems to alert if:- A VM with 16 cores has 1 core at 100%
--> VM CPU-load is at 6,25% (not critical)
--> As this is not an issue: How can I set it up to only alert, if the usage of the whole VM exceeds e.g. 95%?
Best wishes
KPS - A VM with 16 cores has 1 core at 100%
-
Hi!
I'm not sure to get it
-
@olivierlambert
The alert is already triggered, when ONE vCore is at >95%
IMHO, it should trigger, when the VM usage exceeds 95% on all its cores -
Just to double check I get it:
- You configure the perf alert plugin to report VM usage at more than 95%
- You have a VM with 16 cores having only one core at 100%, the rest is almost idle.
- You do NOT want to be alerted in that case, only if ALL cores are beyond 95%
Is that correct?
-
@olivierlambert
Correct - nearlyβ¦
When the total usage is >95% inside the vm -
Not sure to get the difference between "ALL cores are beyond 95%" vs "total usage >95%", isn't the same thing?
-
@olivierlambert
Nearly, but no:Take a 2-core system with
- core 1 at 100%
- core 2 at 91%
Total >95%, but not all cores >95%
-
Ah yes, you mean the average total CPU usage then Got it, thanks!
edit: or the sum, like if you have 8 cores, 800% would be the max and the threshold will be 760% (equivalent to 95 per 100)
-
@Bastien-Nollet can you check the current logic for CPU alerts? I thought initially it was like @KPS described
-
@olivierlambert I'm not familiar with the perf-alert plugin but it seems that @KPS is right, see : https://github.com/vatesfr/xen-orchestra/blob/7882debe7adc7d4945da7e27d9825b1ffcf78ca9/packages/xo-server-perf-alert/src/index.js#L31
-
Okay so it will be more logical to use the same logic than with the Load balancer, where we compute a total of all vCPUs