]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/pg_autoscaler: Added autoscale-profile feature
authorKamoltat <ksirivad@redhat.com>
Tue, 13 Apr 2021 21:12:40 +0000 (21:12 +0000)
committerKamoltat <ksirivad@redhat.com>
Thu, 26 Aug 2021 19:56:44 +0000 (19:56 +0000)
commit2d9bdaa477f8d0370a8c56ad8bd843e066cc2d3d
tree05c397105c71ca2b2be94a496c3ca428d6e7f8d5
parent01700781b824e0a90d771237fb36a9fbae0c4303
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>
(cherry picked from commit 0e49683b538026e4c51a040950da3dbb9c7e92d5)
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]