Skip to content

rgw: initialize heap profiler during daemon startup - #67897

Closed
Aryan-coder06 wants to merge 1 commit into
ceph:mainfrom
Aryan-coder06:rgw-heap-profiler-startup
Closed

Aryan-coder06 wants to merge 1 commit into
ceph:mainfrom
Aryan-coder06:rgw-heap-profiler-startup

Conversation

@Aryan-coder06

Copy link
Copy Markdown
Contributor

Initialize the heap profiler during radosgw startup and link radosgw
against the existing heap_profiler implementation.

RGW startup was missing the ceph_heap_profiler_init() hook, and
radosgw was not linked against heap_profiler. This wires RGW into the
existing startup path so CEPH_HEAP_PROFILER_INIT=true can activate heap
profiling for RGW too.

No doc update is included here because this change is limited to startup
wiring.

Validation

Manual validation on a reduced local build:

  • built radosgw successfully
  • started a local cluster with:
    CEPH_HEAP_PROFILER_INIT=true MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d
  • observed RGW startup log line:
    Starting tracking the heap

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

Initialize the heap profiler during radosgw startup and link
radosgw against the existing heap_profiler implementation.

RGW startup was missing the ceph_heap_profiler_init() hook, and
radosgw was not linked against heap_profiler. Wire RGW into the
existing startup path so CEPH_HEAP_PROFILER_INIT=true can activate
heap profiling for RGW too.

No doc update is included here because this change is limited to
startup wiring.

Signed-off-by: Aryan-coder06 <[email protected]>
@Aryan-coder06
Aryan-coder06 requested a review from a team as a code owner March 19, 2026 16:21
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

14 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@cbodley

cbodley commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

cc @VinayakTiwari1103 regarding #67446

@Aryan-coder06

Copy link
Copy Markdown
Contributor Author

Thanks for the pointer. I checked #67446.
#67446 adds RGW heap admin-socket support, links
radosgw against heap_profiler, and updates docs/tests around that path.

This PR is narrower: it adds ceph_heap_profiler_init() during RGW startup in
src/rgw/rgw_main.cc so CEPH_HEAP_PROFILER_INIT=true is honored for RGW,
similar to MON/MDS/OSD.

There is overlap on the heap_profiler link line because the startup hook
needs that link to build on current main.

If you'd prefer this startup hook to be folded into #67446 instead, I'm happy
to close this PR and post the change there.

@VinayakTiwari1103

Copy link
Copy Markdown
Contributor

Thanks for the pointer. I checked #67446. #67446 adds RGW heap admin-socket support, links radosgw against heap_profiler, and updates docs/tests around that path.

This PR is narrower: it adds ceph_heap_profiler_init() during RGW startup in src/rgw/rgw_main.cc so CEPH_HEAP_PROFILER_INIT=true is honored for RGW, similar to MON/MDS/OSD.

There is overlap on the heap_profiler link line because the startup hook needs that link to build on current main.

If you'd prefer this startup hook to be folded into #67446 instead, I'm happy to close this PR and post the change there.

Thanks for the contribution. I’d prefer keeping profiling control via the admin socket so it can be enabled and managed on demand

@yuvalif

yuvalif commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

this actually allows for profiling whatever is happening on startup.
less useful than controlling that on runtime as #67446 does. but might still make sense.
especially in test/dev environment. we should probably do that as followup work after the main PR is merged
@mkogan1 do you think we should add this option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants