]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Limit volume copy bandwidth per backend
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Mon, 19 Jan 2015 21:34:18 +0000 (16:34 -0500)
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>
Mon, 23 Feb 2015 21:30:20 +0000 (16:30 -0500)
commitccd7463ef625b7b9b7968b8c8b1c4ef8de3cb3c0
treee7e6e04ce65fdd3d66f50c97f8e2e861727ee0b5
parentf4f46e972004eca66e4751a836156c342e448621
Limit volume copy bandwidth per backend

Currently, by setting volume_copy_bps_limit in cinder.conf,
volume/image copy can be throttled to mitigate slow down of
instances' volume access during the copy. However, this is a global
setting and applied to all the backends.
This change enables admins to configure volume_copy_bps_limit to
different values among backends by specifying it in each backend
section.

In addition, with this change, the bps limit will be divided when
multiple volume copy operations run concurrently on the same backend.
For example, if volume_copy_bps_limit is set to 100MB/s, and 2 copies
are running on a backend, each copy can use up to 50MB/s.
This behavior will be useful for QoS which ensures a certain amount
of bandwidth is kept for instances' volume access.

This introduces Throttle classes to count volume copies in a backend
and setup bandwidth limit.

Change-Id: Ie390b46538556fa704b06ffc79cd6cc000bd5936
Implents: blueprint limit-volume-copy-bps-per-backend
cinder/image/image_utils.py
cinder/tests/test_image_utils.py
cinder/tests/test_volume.py
cinder/tests/test_volume_throttling.py [new file with mode: 0644]
cinder/tests/test_volume_utils.py
cinder/volume/driver.py
cinder/volume/manager.py
cinder/volume/throttling.py [new file with mode: 0644]
cinder/volume/utils.py