[openstack-dev] [ceilometer] The periodic task on openstack

Jiang, Yunhong yunhong.jiang at intel.com
Fri Nov 16 08:42:09 UTC 2012


Resend as it's about ceilometer only.

> -----Original Message-----
> From: Jiang, Yunhong [mailto:yunhong.jiang at intel.com]
> Sent: Friday, November 16, 2012 4:34 PM
> To: eglynn at redhat.com; Doug Hellmann <doug.hellmann at dreamhost.com>
> (doug.hellmann at dreamhost.com); timjr at yahoo-inc.com
> Cc: openstack-dev at lists.openstack.org
> Subject: [openstack-dev] The periodic task on openstack
> 
> A follow-up for your discussion on IRC last night, I had a quick check of the
> loopingcall implementation, and seems there is really no time gurantee. Even if
> we adjust the interval for greenthread.sleep() dynamically, we also must make
> the metering periodic task always at the head.
> 
> I think we can enhance the periodic task to meet partially our requirement, like
> create a separated task type as high-priority, which should make sure no
> long-delay.
> 
> The only concern is, can we make sure the LoopingCall itself will be invoked on
> time after the greenthread.sleep(interval), considering the attribute of
> greenthread, or even python thread.
> 
> openstack/common/loopingcall.py-> LoopingCall(object):
> 
>                 while self._running:
>                     self.f(*self.args, **self.kw)
>                     if not self._running:
>                         break
>                     greenthread.sleep(interval)
> 
> Thanks
> --jyh
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list