Activity log for bug #1483165

Date Who What changed Old value New value Message
2015-08-10 08:46:40 wangxiyuan bug added bug
2015-08-10 08:46:46 wangxiyuan cinder: assignee wangxiyuan (wangxiyuan)
2015-08-10 10:01:11 OpenStack Infra cinder: status New In Progress
2015-08-12 07:19:20 wangxiyuan description Now, when get the volume without limit, cinder will get all volume information from db first. Then get the max limit from CONF and filter it. It will waste much time to do it. For example, if cinder has more than ten thousand volumes and max limit is one thousand. Cinder will get the ten thousand ones, then filter it. The remaining nine thousand volume is useless but have already occupied memory and time. So I think a better way is to get the one thousand volume directly from db. offset could be passed to db layer as well. Do indexing only once in db in enough and efficient. Now, when get the volume without limit, cinder will get all volume information from db first. Then get the max limit from CONF and filter it. It will waste much time to do it. For example, if cinder has more than ten thousand volumes and max limit is one thousand. Cinder will get the ten thousand ones, then filter it. The remaining nine thousand volume is useless but have already occupied memory and time. So I think a better way is to get the one thousand volume directly from db. offset could be passed to db layer as well. Do indexing only once in db in enough and efficient.
2015-08-12 07:23:16 wangxiyuan description Now, when get the volume without limit, cinder will get all volume information from db first. Then get the max limit from CONF and filter it. It will waste much time to do it. For example, if cinder has more than ten thousand volumes and max limit is one thousand. Cinder will get the ten thousand ones, then filter it. The remaining nine thousand volume is useless but have already occupied memory and time. So I think a better way is to get the one thousand volume directly from db. offset could be passed to db layer as well. Do indexing only once in db in enough and efficient. Now, when get the volume without limit, cinder will get all volume information from db first. Then get the max limit from CONF and filter it. It will waste much time to do it. For example, if cinder has more than ten thousand volumes and max limit is one thousand. Cinder will get the ten thousand ones, then filter it. The remaining nine thousand volume is useless but have already occupied memory and time. So I think a better way is to get the one thousand volume directly from db. offset could be passed to db layer as well. Do indexing only once in db in enough and efficient. Here are some test data: Env: There are 60,000 volumes items, 370,000 volume_metadata items and 240,000 volume_glance_metadata items in cinder db. Old volume index will use nearly 10G memory. The new one just use about 500M memory.
2015-08-12 18:02:41 OpenStack Infra cinder: assignee wangxiyuan (wangxiyuan) Gorka Eguileor (gorka)
2015-08-13 01:17:34 OpenStack Infra cinder: assignee Gorka Eguileor (gorka) wangxiyuan (wangxiyuan)
2015-08-13 02:21:32 Xing Yang cinder: milestone liberty-3
2015-08-13 02:21:41 Xing Yang cinder: importance Undecided Medium
2015-08-28 00:46:50 wangxiyuan cinder: status In Progress Fix Committed
2015-09-03 14:42:39 Thierry Carrez cinder: status Fix Committed Fix Released
2015-10-15 11:49:29 Thierry Carrez cinder: milestone liberty-3 7.0.0