[mongo] db-ttl performance issue

Bug #1270779 reported by Mehdi Abaakouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Igor Degtiarov

Bug Description

Hi,

When db-ttl is issue, the sample table is cleaned with the native ttl feature of mongodb but the user/project/resource table are cleaned manually

The mongo implementation use db.meter.group() to find user/project/resource record to delete. But if the database have many many records, this operation locks a tone of documents, and all other ceilometer operations can be locked, slowed, or some documents can be missed in a map/reduce operation (making the result of a statistic wrong for example).

Cheers,

Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → Medium
Changed in ceilometer:
assignee: nobody → Igor Degtiarov (idegtiarov)
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/132988

Changed in ceilometer:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit 69e3120a892da722be7727079fd0f2d5a8ac6f0f
Author: Igor Degtiarov <email address hidden>
Date: Thu Nov 6 17:46:46 2014 +0200

    [MongoDB] Refactor time to live feature

    This change adds ttl index to last_sample_timestamp field in resource
    table, so data cleans in background after time to live is expired with
    low priority and without blocking database, instead of reduce operation.

    Change-Id: I13e336a9ad0d771962bf81a33818b4b233ae3e51
    Closes-Bug: #1270779

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-1 → 2015.1.0
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.