Re: [openstack-dev] [Ceilometer] time consuming of listing resource

2013-12-28 Thread Haomai Wang
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, 刘胜 liusheng1...@126.com wrote:

 Hi all:
 I have reported a bug about time consuming of “resource-list” in
 ceilometer CLI:
 https://bugs.launchpad.net/ceilometer/+bug/1264434

 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(
 resource_id=meter.resource_id,
 project_id=meter.project_id,
 first_sample_timestamp=first_ts,
 last_sample_timestamp=last_ts,
 source=meter.sources[0].id,
 user_id=meter.user_id,
 metadata=meter.resource_metadata,
 meter=[
 api_models.ResourceMeter(
 counter_name=m.counter_name,
 counter_type=m.counter_type,
 counter_unit=m.counter_unit,
 )
 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 30 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 10
 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
 consumption.

 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
 liusheng


 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 

Best regards,

Haomai Wang, UnitedStack Inc.
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Nova] Virtio-Serial support for Nova libvirt driver

2013-09-24 Thread Haomai Wang

On Sep 24, 2013, at 6:40 PM, P Balaji-B37839 b37...@freescale.com wrote:

 Hi,
 
 Virtio-Serial interface support for Nova - Libvirt is not available now. Some 
 VMs who wants to access the Host may need like running qemu-guest-agent or 
 any proprietary software want to use this mode of communication with Host.
 
 Qemu-GA uses virtio-serial communication.
 
 We want to propose a blue-print on this for IceHouse Release.
 
 Anybody interested on this.

Great! We have common interest and I hope we can promote it for IceHouse.

BTW, do you have a initial plan or description about it. 

And I think this bp may invoke. 
https://blueprints.launchpad.net/nova/+spec/qemu-guest-agent-support

 
 Regards,
 Balaji.P
 
 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Best regards,
Haomai Wang, UnitedStack Inc.


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] generate_sample.sh

2013-07-26 Thread Haomai Wang
2013-7-26,3:11 pm,Tian, Shuangtai shuangtai.t...@intel.com Wrote:

 Recently,generate_sample.sh had been changed . look the help.
 For example, try run ./tools/config/generate_sample.sh -b ./ -p nova -o 
 ./etc/nova and commit the changes in nova.conf.sample
I don't know why I can't run command as expected see below.

$ ./tools/config/generate_sample.sh -b ./ -p nova -o ./etc/nova
generate_sample.sh: missing project base directory
Try `generate_sample.sh --help' for more information.

  
 From: Haomai Wang [mailto:hao...@unitedstack.com] 
 Sent: Friday, July 26, 2013 2:50 PM
 To: OpenStack Development Mailing List
 Subject: Re: [openstack-dev] [nova] generate_sample.sh
  
  
  
 2013-7-26,1:58 pm,Gary Kotton gkot...@vmware.com Wrote:
 
 
 Hi,
 Over the last few days I have been battling with this script (I am only 
 human). Recently there was a nice change that removed the number of entries 
 which helps with the merges. One thing that I have encountered over the last 
 2 days is that the pep8 passes with my environment and fails with the 
 gaiting. Would it be possible that Jenkins updates the nova.sample.conf in a 
 similar fashion to the way that is done with the translations?
 +1, I encountered the same problem and I think the task running 
 gererate_sample.sh should be given to Jenkins
 
 
 Thanks
 Gary
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
  
 Best regards,
 Haomai Wang, UnitedStack Inc.
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Best regards,
Haomai Wang, UnitedStack Inc.

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev