Repository navigation
mgr: Add per-module performance counters to mgr - #61131
Conversation
a9b09c9 to
9843780
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
9843780 to
f9e8fae
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
f9e8fae to
f23d823
Compare
|
i made some changes to the PR, I removed the memory and CPU since it didn't show correct results |
f23d823 to
cc4d1d7
Compare
cc4d1d7 to
417ab97
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
@rzarzynski, I made the changes. There was also an issue with locks in the monitoring_loop that i needed to fix |
sseshasa
left a comment
There was a problem hiding this comment.
Had a few general comments in the first pass. I will review it more in-depth.
sseshasa
left a comment
There was a problem hiding this comment.
Added a few more comments. Will continue the review.
sseshasa
left a comment
There was a problem hiding this comment.
Added a few comments around the main monitoring loop. Will continue the review based on the outcome of existing comments.
cea0204 to
e209c60
Compare
sseshasa
left a comment
There was a problem hiding this comment.
@NitzanMordhai I did another pass over this PR and added a few comments. PTAL.
e209c60 to
1db8e98
Compare
|
@sseshasa, please see my updates and answers! thanks |
sseshasa
left a comment
There was a problem hiding this comment.
Almost there. Added a few minor comments. PTAL. Thanks!
|
|
||
| #pragma once | ||
| #include "PyModule.h" | ||
| #include <unistd.h> |
There was a problem hiding this comment.
minor nit: The includes from standard libraries should come first, followed by common/* and then the rest.
1db8e98 to
2a02f7a
Compare
sseshasa
left a comment
There was a problem hiding this comment.
LGTM. A lingering minor nit.
| #include "PyModule.h" | ||
| #include "common/debug.h" |
There was a problem hiding this comment.
I meant the following as I see this convention being followed in other places,
| #include "PyModule.h" | |
| #include "common/debug.h" | |
| #include <unistd.h>$ | |
| #include "common/debug.h" | |
| #include "PyModule.h" |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
2a02f7a to
60b3919
Compare
This commit introduces performance counters for individual Ceph mgr modules.
These counters allow monitoring module behavior, debugging latency issues,
and identifying performance bottlenecks, all without modifying the modules themselves.
The following counters are now exposed under:
> ceph daemon mgr.<id> perf dump
Example structure:
"mgr_module_<module_name>": {
"notify_avg_usec": { <- Average time spent handling notify events
"avgcount": 0,
"sum": 0
},
"cmd_avg_usec": { <- Average time spent processing CLI/admin commands
"avgcount": 0,
"sum": 0
},
"serve_avg_usec": { <- Average time spent in module serve loop (if applicable)
"avgcount": 0,
"sum": 0
},
"alive": 1 <- Module is alive (1 = running, 0 = exited)
"cpu_usage": 0, <- CPU usage in percent
"mem_rss_change": 0, <- Memory RSS change in bytes
"mem_rss_current": 490737664 <- Memory RSS current in bytes
}
Signed-off-by: Nitzan Mordechai <[email protected]>
Conflicts:
src/mgr/ActivePyModules.cc - finisher.queue changed by 63859, adding py_module to the parameter list
src/mgr/PyModuleRegistry.cc - check_all_modules_started added by 63859
…able\perf counts Simple test to enable \ disable and get counters dump for checking perf counters. Signed-off-by: Nitzan Mordechai <[email protected]>
60b3919 to
54d3b93
Compare
|
Test /a/skanta-2026-05-08_15:03:45-rados-wip-bharath17-testing-2026-05-08-0400-distro-default-trial/199166/teuthology.log faile with: |
This commit introduces performance counters for individual Ceph mgr modules.
These counters allow monitoring module behavior, debugging latency issues,
and identifying performance bottlenecks, all without modifying the modules themselves.
The following counters are now exposed under:
Example structure:
"mgr_module_<module_name>": {
"notify_avg_usec": { <- Average time spent handling notify events
"sum": 0,
"avgcount": 0
},
"cmd_avg_usec": { <- Average time spent processing CLI/admin commands
"sum": 0,
"avgcount": 0
},
"alive": 1 <- Module is alive (1 = running, 0 = exited)
"cpu_usage": 0, <- CPU usage in percent
"mem_rss_change": 0, <- Memory RSS change in bytes
"mem_rss_current": 512045056, <- Memory RSS current in bytes
"serve_cpu_usage": 0 <- CPU usage by the serve thread of the module
},
Signed-off-by: Nitzan Mordechai [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e