From: Nitzan Mordechai Date: Tue, 19 May 2026 12:30:59 +0000 (+0000) Subject: mgr/ClusterState: remove debug 30 memory spike X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0bac6af3c18a989771e2d5bb9199f8aae64943f8;p=ceph.git mgr/ClusterState: remove debug 30 memory spike Remove the full pg_map JSON dump at dout(30) which was flooding the log queue with multi-MB entries on every tick. The much smaller incremental dump is retained for debugging. Fixes: https://tracker.ceph.com/issues/64082 Signed-off-by: Nitzan Mordechai --- diff --git a/src/mgr/ClusterState.cc b/src/mgr/ClusterState.cc index ee24e3203f13..2201caa17761 100644 --- a/src/mgr/ClusterState.cc +++ b/src/mgr/ClusterState.cc @@ -142,16 +142,14 @@ void ClusterState::update_delta_stats() pending_inc.version = pg_map.version + 1; // to make apply_incremental happy dout(10) << " v" << pending_inc.version << dendl; - dout(30) << " pg_map before:\n"; - JSONFormatter jf(true); - jf.dump_object("pg_map", pg_map); - jf.flush(*_dout); - *_dout << dendl; - dout(30) << " incremental:\n"; - JSONFormatter jf(true); - jf.dump_object("pending_inc", pending_inc); - jf.flush(*_dout); - *_dout << dendl; + if (!pending_inc.empty()) { + dout(30) << " incremental:\n"; + JSONFormatter jf(true); + jf.dump_object("pending_inc", pending_inc); + jf.flush(*_dout); + *_dout << dendl; + } + pg_map.apply_incremental(g_ceph_context, pending_inc); pending_inc = PGMap::Incremental(); } @@ -179,16 +177,13 @@ void ClusterState::notify_osdmap(const OSDMap &osd_map) PGMapUpdater::check_down_pgs(osd_map, pg_map, true, need_check_down_pg_osds, &pending_inc); - dout(30) << " pg_map before:\n"; - JSONFormatter jf(true); - jf.dump_object("pg_map", pg_map); - jf.flush(*_dout); - *_dout << dendl; - dout(30) << " incremental:\n"; - JSONFormatter jf(true); - jf.dump_object("pending_inc", pending_inc); - jf.flush(*_dout); - *_dout << dendl; + if (!pending_inc.empty()) { + dout(30) << " incremental:\n"; + JSONFormatter jf(true); + jf.dump_object("pending_inc", pending_inc); + jf.flush(*_dout); + *_dout << dendl; + } pg_map.apply_incremental(g_ceph_context, pending_inc); pending_inc = PGMap::Incremental(); diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index 023a8093f226..742844d34ab5 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -326,6 +326,16 @@ public: static std::list generate_test_instances(); Incremental() : version(0), osdmap_epoch(0), pg_scan(0) {} + + bool empty() const { + return pg_stat_updates.empty() && + osd_stat_updates.empty() && + osd_stat_rm.empty() && + pg_remove.empty() && + pool_statfs_updates.empty() && + osdmap_epoch == 0 && + pg_scan == 0; + } };