]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/pg_autoscaler: Added autoscale-profile feature 40836/head
authorKamoltat <ksirivad@redhat.com>
Tue, 13 Apr 2021 21:12:40 +0000 (21:12 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 19 May 2021 16:48:35 +0000 (16:48 +0000)
commit0e49683b538026e4c51a040950da3dbb9c7e92d5
tree8d503c97fd0a776d052213cce84c66e4073188ed
parent8f970230b6fa3cc4ee4ca8784f6368db28976599
pybind/mgr/pg_autoscaler: Added autoscale-profile feature

The autoscaler by default will start out each pool with minimal
pgs and `scale-up` the pgs when there is more usage in each pool.

Users can now use the commands:

`osd pool set autoscale-profile scale-down` to make the pools
start out with a full complement of pgs and only `scale-down`
when usage ratio across the pools are not even.

`osd pool set autoscale-profile scale-up` (by default) to make the pools
start out with minimal pgs and `scale-up` the pgs when there
is more usage in each pool.

Edited KVMonitor.cc file to make the `autoscale_profile` variable
persistent.

Edited tests/test_cal_final_pg_target.py so that it takes into account
the new `profile` argument when calling cal_final_pg_target(). Also,
added some new test cases for when profile is `scale-up`

Renamed tests/test_autoscaler.py to a more appropriate name:
tests/test_cal_ratio.py

Signed-off-by: Kamoltat <ksirivad@redhat.com>
src/mon/KVMonitor.cc
src/pybind/mgr/pg_autoscaler/module.py
src/pybind/mgr/pg_autoscaler/tests/test_autoscaler.py [deleted file]
src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py
src/pybind/mgr/pg_autoscaler/tests/test_cal_ratio.py [new file with mode: 0644]