Ask Your Question

Ceilometer cpu_util average

asked 2015-09-16 04:17:27 -0500

Nixa gravatar image


I have yaml template that creates new instances when average cpu_util is above 15% for 60s (If I put threshold above that value OpenStack doesn't create new instances)

When I run load tests top command on my instance shows cpu_util around 95-100 (I run those load tests for longer periods than 60s) In ceilometer-alarm-notifier.log I get values like 15-16 when second instance is created and than values that activate alarm slowly rise, despite that new instances are created. When I stop load test those values quickly drop down and newly created instances are deleted and in notifier log I get values like 1-2 (threshold for scalingdown policy is avg below 5% over 60s).

So my question is how Ceilometer calculates cpu_util average, since it doesn't match top command values?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-17 01:57:57 -0500

Shaoman Zhang gravatar image

cpu_util acquired from Ceilometer does make a difference with top command inside the VM, yet I'm not sure if there is such a big difference.

The way Ceilometer get cpu_util: 1. obtain a VM CPU use time by libvirt dominfo. 2. calculate the real use time between the two polling interval. 3. then use the following formula to get cpu_util: cpu_real_use_time * 100.0 /poll_interval * (10 ** 9 * (resource_metadata.cpu_number or 1))

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2015-09-16 04:17:27 -0500

Seen: 1,123 times

Last updated: Sep 17 '15