[openstack-dev] [Ceilometer] time consuming of listing resource
haomai at unitedstack.com
Sat Dec 28 11:27:47 UTC 2013
I think the better way is save meters as a field in resource table.
You can look at MongoDB model and may get some ideas.
Beside above, sql backend can introduce Memcache to improve performance.
IMO, the best way may be redesign the sql model to match workload.
On Sat, Dec 28, 2013 at 6:51 PM, 刘胜 <liusheng1175 at 126.com> wrote:
> Hi all：
> I have reported a bug about time consuming of “resource-list” in
> ceilometer CLI：
> In order to Identify the causes of this phenomenon, I have pdb the codes
> in my invironment(configured mysql as db driver):
> the most import part of process of listing resource is implemented in
> following codes:
> code of get_resources() in /ceilometer/storage/impl_sqlalchemy.py：
> for meter, first_ts, last_ts in query.all():
> yield api_models.Resource(
> for m in meter.resource.meters
> The method generate iterator of object of api_models.Resource for
> ceilometer API to show.
> 1.The operation “query.all()” will query the DB table “meter” with the
> expression generated forward,in my invironment the DB table “meter” have
> more than 300000 items, so this operation may consume about 30 seconds;
> 2.The operation "for m in meter.resource.meters" will circulate the
> meters of this resource . a resource of server may have more than 100000
> meter iterms in my invironment. So the time of whole process is too
> long. I think the meter of Resource object can be reduced and I have
> tested this modification, it is OK for listing resource,and reduce the
> most time consumption
> I have noticed that there are many methods of db operation may time
> ps: I have configured the ceilometer pulling interval from 600s to 60s in /etc/ceilometer/pipeline.yaml,
> but the invironment has just run 10 days!
> I'm a beginner of ceilometer,and want to fix this bug,but I haven't found
> a suitable way
> may be someone can help me with this?
> Best Regards
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
Haomai Wang, UnitedStack Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev