]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/pg_autoscaler: Cut back osdmap.get_pools calls
authorKamoltat <ksirivad@redhat.com>
Tue, 25 Jul 2023 13:54:33 +0000 (13:54 +0000)
committerKamoltat <ksirivad@redhat.com>
Tue, 15 Aug 2023 18:34:43 +0000 (18:34 +0000)
commit08821c4ef391f4bacf43309b51b6fb926ab3fe34
treedeeb41205fb6d3198d3790de04374ef71bcd61cf
parent5de542ad87f220bb335bc2c83279e36a129510f9
pybind/mgr/pg_autoscaler: Cut back osdmap.get_pools calls

Problem:
we have been extravagantly using osdmap get calls
which has led to performance issue when `pg_num`
is around ~3000.

Solution:
Limit the use of osdmap get calls by calling it once
and use the data for both functions `maybe_adjust`
and `update_progress_events`.

Fixes: https://tracker.ceph.com/issues/62165
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit ce45c41bc4c28775a05a23c1bb8a17be46af50d8)
src/pybind/mgr/pg_autoscaler/module.py