Comment 0 for bug 1483165

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

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.