<br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 10:23 AM, Eoghan Glynn <span dir="ltr"><<a href="mailto:eglynn@redhat.com" target="_blank">eglynn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Hi Yawei Wu,<br>
<br>
The root of the confusion is the fact the cpu meter is reporting<br>
the cumlative cpu_time stat from libvirt. This libvirt counter is<br>
reset when the associated qemu process is restarted (an artifact<br>
of how cpuacct works).<br>
<br>
So when you stop/start or suspend/resume, a fresh qemu process<br>
is sparked up, then the cumulative time is reset.<br>
<br>
Thanks for bringing this up, as it has implications as to how<br>
we meter CPU time and utilization[1].<br>
<br>
We may need to start metering the delta between CPU times on<br>
subsequent polling cycles, instead of using a cumulative meter<br>
(dealing with the edge case where the instance has been restarted<br>
within a polling period).<br></blockquote><div><br></div><div>Good idea. We need to capture this issue to make sure we get it onto the roadmap for this cycle. Is there a bug or blueprint for it yet?</div><div><br>Doug</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Eoghan<br>
<br>
[1] <a href="https://review.openstack.org/14921" target="_blank">https://review.openstack.org/14921</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> I am still testing ceilometer now. I am confused about the meter<br>
> volume<br>
> in the mongodb. Let's talk about cpu usage.<br>
><br>
> After I create and boot a vm named vm_1, meter data record about cpu<br>
> usage will be inserted into db in cycle(default 10 minutes). For<br>
> example,the 'counter_volume' of the first record is '52060000000',and<br>
> the second one is '123890000000'.<br>
><br>
> 1) '123890000000' nanoseconds means '123.89' seconds or two<br>
> minutes,it<br>
> seem like to be 1238.9 seconds actually, is there something wrong ?<br>
><br>
> 2) If I never reboot or suspend vm_1, will the 'counter_volume' of<br>
> cpu<br>
> usage record increase all the time ? Just like '8 minutes' -> '18<br>
> minutes' -> '28 minutes' ?<br>
><br>
> 3) If I reboot or suspend vm_1, I find that the 'counter_volume' of<br>
> cpu<br>
> usage record will count from zero. Just like '8 minutes' -> '18<br>
> minutes'<br>
> -> '28 minutes' [-> '0 minutes'] ->'5 minutes' -> '15 minutes'. Does<br>
> it<br>
> mean that 'counter_volume' just represents how long has vm_1 been<br>
> booted<br>
> up ?<br>
><br>
> 4) This one is about Web API. I find that "GET<br>
> /v1/resources/(resource)/meters/(meter)/volume/sum" just return the<br>
> sum<br>
> value of all the cpu 'counter_volume', like '8 minutes' + '18<br>
> minutes'.<br>
> Is it reduplicate ?<br>
><br>
> 5) If I want to know how long has vm_1's cpu been used yesterday, how<br>
> can I do ?<br>
><br>
> It seems like that I have too many questions..<br>
><br>
> Thank you very much !<br>
><br>
><br>
> -----------------------<br>
> Yawei Wu<br>
> Dalian Hi-Think Computer Technology,Corp.<br>
><br>
> _______________________________________________<br>
> Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
> Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
> Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
> More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
><br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</div></div></blockquote></div><br>