]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerSage Weil <sage@newdream.net>
Wed, 8 Dec 2021 12:13:27 +0000 (07:13 -0500)
commitf5973ccef415571c72560a04968592e8a6daf93a
treee4e7a640a6d5cd2762fcbf8d6dee8a885247b0f5
parent907f38c15182421ceaf70abd19d1dee0d16fd837
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>
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