]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ClusterState: remove debug 30 memory spike 69325/head
authorNitzan Mordechai <nmordech@ibm.com>
Tue, 19 May 2026 12:30:59 +0000 (12:30 +0000)
committerNitzan Mordechai <nmordech@ibm.com>
Sun, 28 Jun 2026 10:54:42 +0000 (10:54 +0000)
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 <nmordech@ibm.com>
src/mgr/ClusterState.cc
src/mon/PGMap.h

index ee24e3203f132b5e2c6d2b927edaf5367666db62..2201caa17761aeae9d2c57e331d6f722e1ec6de1 100644 (file)
@@ -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();
index 023a8093f226eb01fa8e1326aefc61e176b21326..742844d34ab5595a0d6308c879f6e9f4e9deb52f 100644 (file)
@@ -326,6 +326,16 @@ public:
     static std::list<Incremental> 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;
+    }
   };