cinder/cinder/api/v2
Gorka Eguileor 28879f9a78 On Volume list only retrieve needed data from DB
Currently when there is no limit set on a volume list query we retrieve
all volumes and then limit them locally using osapi_max_limit.  Similar
thing happens when we are using the marker for next pages, we get all
volumes from that marker until the last volume and then limit it
locally.

We should be limiting it on the DB side so we only retrieve the data we
are actually going to return to the API caller.

This patch always limits the data retrieved from the DB and for the
offset to keep working as it was before we need to do the offset on the
DB side as well.

For reference some tests were performed:

On a deployment with 60,000 volumes, 370,000 volume_metadata items and
240,000 volume_glance_metadata items in cinder db.  Before the patch
this will use nearly 10G memory.  With the patch we will just use about
500M.

Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
Closes-bug:#1483165i
Change-Id: Ie903e546074fe118299e8e1acfb9c88c8a10d78c
2015-08-14 10:05:47 +02:00
..
views On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
__init__.py adding copy of v1 as v2 2012-11-21 21:26:40 -08:00
limits.py Fix multi-line docstrings to meet hacking rules 2015-07-30 11:34:16 -05:00
router.py Use oslo.log instead of oslo-incubator 2015-03-11 21:45:04 -05:00
snapshot_metadata.py Validate outermost request body element name consistently 2015-06-18 23:16:48 -07:00
snapshots.py Remove unused context parameter 2015-07-27 02:03:53 -07:00
types.py Change generic NotFound to specific exception 2015-06-25 05:25:07 -07:00
volume_metadata.py set/unset volume image metadata 2015-07-11 12:13:58 +08:00
volumes.py On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00