ceilometer cpu_util over 100%
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
gordon chung |
Bug Description
in kilo, cpu_util of a few vms in ceilometer is alway over 100%:
[root@control ~(keystone_test)]# ceilometer sample-list -m cpu_util -l 30
+------
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+------
| 9085bab1-
| 1e48031f-
| 3dff08bd-
| 86735967-
| 1dd58360-
| 73efc5e0-
| 7602c307-
| 9085bab1-
| 1e48031f-
| 3dff08bd-
| 86735967-
| 1dd58360-
| 73efc5e0-
| 7602c307-
| 9085bab1-
| 1e48031f-
| 3dff08bd-
| 86735967-
| 1dd58360-
| 73efc5e0-
| 7602c307-
+------
in kilo source code, I found that cpu_util is related to cpu, and the cputime of cpu(meter) is from:
ceilometer/
def inspect_cpus(self, instance):
domain = self._lookup_
dom_info = domain.info()
return virt_inspector.
(the same to liberty)
This API is decribed in libvirt:
struct virDomainInfo {
....
unsigned long long cpuTime
}
I think this cpuTime is the time of the vm(guest) cpus using compute-node(host) cpus, is greater than actual vm cpus using time, just as the result of this libvirt command:
[root@compute ~]# virsh cpu-stats instance-00000008
CPU0:
cpu_time 23430.267346021 seconds
vcpu_time 20686.192447612 seconds
CPU1:
cpu_time 28564.062613594 seconds
vcpu_time 26046.699831451 seconds
CPU2:
cpu_time 29813.558938521 seconds
vcpu_time 27469.282667848 seconds
CPU3:
cpu_time 31055.550565857 seconds
vcpu_time 28872.558341115 seconds
Total:
cpu_time 112863.444574414 seconds
user_time 105659.660000000 seconds
system_time 3988.980000000 seconds
So, I think the vm cputime shoud be got from domain.vcpus()
struct virVcpuInfo {
...
unsigned long long cpuTime
...
}
the code is modified :
ceilometer/
def inspect_cpus(self, instance):
domain = self._lookup_
return virt_inspector.
this seems like a duplicate of https:/ /bugs.launchpad .net/ceilometer /+bug/1421584
can you confirm?