cinder/cinder
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
..
api On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
backup Merge "Corrected order of parameters in docstring" 2015-08-11 22:59:26 +00:00
brick Add deactivate step to extend_lv 2015-07-28 11:46:25 -07:00
cmd ConsistencyGroup Object 2015-08-10 11:31:11 +02:00
common On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
compute Add ability to override OpenStack privileged user auth url 2015-07-09 18:10:13 -04:00
consistencygroup ConsistencyGroup Object 2015-08-10 11:31:11 +02:00
db On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
hacking Remove useless logging from unit tests 2015-07-13 17:39:44 +00:00
image Merge "Fix multi-line docstrings to meet hacking rules" 2015-07-31 22:24:40 +00:00
keymgr Fix multi-line docstrings to meet hacking rules 2015-07-30 11:34:16 -05:00
locale Imported Translations from Transifex 2015-03-26 06:08:06 +00:00
objects ConsistencyGroup Object 2015-08-10 11:31:11 +02:00
openstack Sync scheduler module from oslo-incubator 2015-08-06 04:29:11 +00:00
replication Use oslo.log instead of oslo-incubator 2015-03-11 21:45:04 -05:00
scheduler ConsistencyGroup Object 2015-08-10 11:31:11 +02:00
testing updating testing readme with more current information. 2014-02-26 09:21:13 -05:00
tests On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
transfer Notify the transfer volume action in cinder 2015-07-07 17:14:34 +08:00
volume On Volume list only retrieve needed data from DB 2015-08-14 10:05:47 +02:00
zonemanager Brocade driver not parsing zone data correctly 2015-05-26 14:42:12 +08:00
__init__.py
context.py Add Cinder internal tenant support 2015-07-23 14:46:53 +00:00
exception.py Merge "Remove StorPool Driver" 2015-08-10 17:02:38 +00:00
flow_utils.py Refactoring of manager's create_volume flow 2015-07-24 11:19:09 +02:00
i18n.py Change leftover oslo.* to oslo_* 2015-03-23 19:52:42 +00:00
manager.py Remove unused context parameter 2015-07-27 02:03:53 -07:00
policy.py Switch to oslo.policy 0.3.0 2015-06-16 22:03:09 +03:00
quota.py Merge "Fix get default quota values for subprojects" 2015-08-03 20:36:34 +00:00
quota_utils.py Logging not using oslo.i18n guidelines 2015-03-19 12:28:12 -05:00
rpc.py Move oslo.messaging to the oslo_messaging namespace 2015-03-03 09:21:25 -06:00
service.py sqlalchemy exception kills FixedIntervalLoopingCall thread 2015-07-30 16:17:17 +00:00
ssh_utils.py Fix Python 3 issues in utils 2015-06-15 10:29:22 +02:00
test.py Remove unit test migration logging 2015-08-06 16:46:27 -05:00
utils.py Fix multi-line docstrings to meet hacking rules 2015-07-30 11:34:16 -05:00
version.py
wsgi.py Switch to oslo.service 2015-06-24 21:55:32 +02:00