Polling by Compute Agent may not be efficient

Bug #1293337 reported by SamP
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Wishlist
Rikimaru Honjo

Bug Description

For each polling intervals, Compute Agent first acquire the list of VM using instance_get_all_by_host method in nova_client.py.
Then, for each VMs, the details of flavor and image are acquired by _with_flavor_and_image method.
Required time for above operation increases proportional to the number of VMs.

There might be more efficient way of collecting information,
with which the required time can be sub-linear to the number of VMs (not always, of course. Worst case remains linear).

Ideas are:
- It is not necessary to acquire all the information every time.
    Utilize some kind of cache and differential acquisition may help.
- Reduce the number of nova's client call:
   Is it possible to acquire several information at once?

Changed in ceilometer:
assignee: nobody → Sampath Priyankara (sampath-priyankara)
Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/98301

Changed in ceilometer:
assignee: Sampath Priyankara (sampath-priyankara) → Rikimaru Honjo (honjo-rikimaru-c6)
status: Triaged → In Progress
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-1
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: juno-1 → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/98301
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=4863fc95bcbbb6f7dbe7e48ef13f370456611738
Submitter: Jenkins
Branch: master

commit 4863fc95bcbbb6f7dbe7e48ef13f370456611738
Author: Rikimaru Honjo <email address hidden>
Date: Tue Jun 10 18:16:21 2014 +0900

    Adds caches for image and flavor in compute agent

    Currently to obtain image and flavor data,
    compute agent always calls nova api, even for the same id of image/flavor.
    In order to reduce the number of nova-client call, caches for image and flavor
    are introduced.

    The caches only live in a local scope of _with_flavor_and_image: created every
    single polling interval and thrown away at the end of the interval.
    Although the caches only live in a short time, they are effective because same
    flavors are used many times in one compute-node in typical use cases.

    Change-Id: I63b6a59f06be4911f39073e34cfc3a2a7b832c51
    Closes-bug: #1293337

Changed in ceilometer:
status: In Progress → Fix Committed
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.