openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #18035
Re: [ceilometer] meter data volume
Hi Yawei Wu,
The root of the confusion is the fact the cpu meter is reporting
the cumlative cpu_time stat from libvirt. This libvirt counter is
reset when the associated qemu process is restarted (an artifact
of how cpuacct works).
So when you stop/start or suspend/resume, a fresh qemu process
is sparked up, then the cumulative time is reset.
Thanks for bringing this up, as it has implications as to how
we meter CPU time and utilization[1].
We may need to start metering the delta between CPU times on
subsequent polling cycles, instead of using a cumulative meter
(dealing with the edge case where the instance has been restarted
within a polling period).
Cheers,
Eoghan
[1] https://review.openstack.org/14921
> I am still testing ceilometer now. I am confused about the meter
> volume
> in the mongodb. Let's talk about cpu usage.
>
> After I create and boot a vm named vm_1, meter data record about cpu
> usage will be inserted into db in cycle(default 10 minutes). For
> example,the 'counter_volume' of the first record is '52060000000',and
> the second one is '123890000000'.
>
> 1) '123890000000' nanoseconds means '123.89' seconds or two
> minutes,it
> seem like to be 1238.9 seconds actually, is there something wrong ?
>
> 2) If I never reboot or suspend vm_1, will the 'counter_volume' of
> cpu
> usage record increase all the time ? Just like '8 minutes' -> '18
> minutes' -> '28 minutes' ?
>
> 3) If I reboot or suspend vm_1, I find that the 'counter_volume' of
> cpu
> usage record will count from zero. Just like '8 minutes' -> '18
> minutes'
> -> '28 minutes' [-> '0 minutes'] ->'5 minutes' -> '15 minutes'. Does
> it
> mean that 'counter_volume' just represents how long has vm_1 been
> booted
> up ?
>
> 4) This one is about Web API. I find that "GET
> /v1/resources/(resource)/meters/(meter)/volume/sum" just return the
> sum
> value of all the cpu 'counter_volume', like '8 minutes' + '18
> minutes'.
> Is it reduplicate ?
>
> 5) If I want to know how long has vm_1's cpu been used yesterday, how
> can I do ?
>
> It seems like that I have too many questions..
>
> Thank you very much !
>
>
> -----------------------
> Yawei Wu
> Dalian Hi-Think Computer Technology,Corp.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References