]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/progress: avoid inefficient dump of all pg stats
authorSage Weil <sage@newdream.net>
Fri, 3 Dec 2021 18:48:32 +0000 (13:48 -0500)
committerNeha Ojha <nojha@redhat.com>
Wed, 16 Feb 2022 17:20:47 +0000 (17:20 +0000)
commit2cdf2950e84f91c014e96e72ce2b08bd78aebbad
tree2ea77e0df0adfdd7127b817518bab0048a39ffbb
parent4a37f1cde5719e8a3f6f1aaba67d7a6a02bbd067
mgr/progress: avoid inefficient dump of all pg stats

We only use a handful of fields, and the pg dump includes a gazillion
fields that we waste CPU copying to python-land.  This tends to lead to
long ClusterState::lock hold times, leading to long ms_dispatch delays
and generally gumming up the works.

Instead, create a new "pg_progress" item that dumps only the fields that
mgr/progress needs.

Fixes: https://tracker.ceph.com/issues/53475
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f5973ccef415571c72560a04968592e8a6daf93a)
src/mgr/ActivePyModules.cc
src/mon/PGMap.cc
src/mon/PGMap.h
src/pybind/mgr/progress/module.py
src/pybind/mgr/progress/test_progress.py