It takes long time to get image-list since page size is too small

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

Bug Description

Central Agent (actually plugins defined in ceilometer/image/glance.py) uses glanceclient to get image-list from glance.
Since glanceclient has pagination feature, it calls glance API for every page sizes. When glanceclient is used by Central Agent, default value of page size, that is 20, is used, since Central Agent doesn't specify page size.
However, default value of page size is too small when there is a large number of images.

ex)
If there are 10000 images, glanceclient will call glance API 500 times (10000/20=500).
In this case, getting image-list takes about 440 seconds, which is too long.

By specifying page size, the time to get image-list can be shortened.
In above example, by setting page size to 100, the time can be shortened to 1/4, 100 seconds.

Therefore we need to specify page size from Central Agent.

Changed in ceilometer:
assignee: nobody → Rikimaru Honjo (honjo-rikimaru-c6)
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/106304

Changed in ceilometer:
status: New → In Progress
description: updated
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-3
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit c6694dea349f4aad63cc06fb42ae5c5907e902ed
Author: Rikimaru Honjo <email address hidden>
Date: Mon Aug 11 22:00:50 2014 +0900

    Set page size when Glance API request is called

    The glance related pollsters in central agent uses glanceclient to get
    image-list from glance. Since glanceclient has pagination feature,
    it calls glance API for every page sizes. When glanceclient is used by
    Central Agent, default value of page size, that is 20, is used, since
    Central Agent doesn't specify page size. However, default value of page
    size is too small when there is a large number of images.

    Therefore we need to specify page size from Central Agent.

    Change-Id: I5f6457234a2963bbe567d078f2c8bb098c8a311c
    Closes-bug: #1340577

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-3 → 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.