Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1279543

Summary: cinder-api is consuming around 10GB RAM when running a "snapshot-list" command on the large set of data
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: openstack-cinderAssignee: Gorka Eguileor <geguileo>
Status: CLOSED ERRATA QA Contact: lkuchlan <lkuchlan>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.0 (Juno)CC: adahms, eharney, fpercoco, geguileo, jobernar, jschluet, nlevinki, scohen, sgotliv, yeylon
Target Milestone: asyncKeywords: ZStream
Target Release: 6.0 (Juno)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-cinder-2014.2.3-11.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the Block Storage service would calculate filters, limits, and offset locally instead of in the database. This would result in a large amount of memory being required to perform these calculations because all non-deleted entries in the database would need to be retrieved. With this update, these calculations are now performed in the database, and only the data to be listed are retrieved.
Story Points: ---
Clone Of: 1278576 Environment:
Last Closed: 2016-01-21 13:54:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Harney 2015-11-09 17:10:44 UTC
+++ This bug was initially created as a clone of Bug #1278576 +++

Description of problem:

Cinder is performing an inefficient query: when looking
for information about snapshots associated with a particular volume,
it loads all the rows from the database and then filters them in
memory.  


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create a lot of snapshots
2. Run cinder snapshot-list command, use volume_id to return only snapshots related to that specific volume

Actual results:

1. cinder-api is consuming a lot of memory after performing cinder snapshot-list
2. query returns a lot of unrelated records from the database (snapshots of a different volumes)


Expected results:

memory usage should be normal, 
query should return only relevant records


Additional info:

Comment 1 Jon Schlueter 2015-11-09 18:26:41 UTC
*** Bug 1279561 has been marked as a duplicate of this bug. ***

Comment 3 lkuchlan 2016-01-05 10:58:20 UTC
Tested using:
python-cinder-2014.2.3-11.el7ost.noarch
python-cinderclient-1.1.1-1.el7ost.noarch
openstack-cinder-2014.2.3-11.el7ost.noarch

Comment 5 errata-xmlrpc 2016-01-21 13:54:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0059.html