Memory profiling is the process of dynamic program analysis to determine a program's memory consumption and identify ways to optimize it. In this recipe, we discuss how you can use memory profilers on the Ceph daemons for memory investigation.
# ceph tell osd.0 heap start_profiler
# ceph tell osd.0 heap stats
/var/log/ceph/osd.0.profile.0001.heap
:# ceph tell osd.0 heap dump
google-perftools
:# yum install -y google-perftools
# pprof --text {path-to-daemon} {log-path/filename} # pprof --text /usr/bin/ceph-osd /var/log/ceph/osd.0.profile.0001.heap
# pprof --text --base /var/log/ceph/osd.0.profile.0001.heap /usr/bin/ceph-osd /var/log/ceph/osd.0.profile.0002.heap
# ceph tell osd.0 heap release
# ceph tell osd.0 heap stop_profiler
The Ceph daemons process has matured much, and you might not really need memory profilers for analysis, unless you encounter a bug that's causing memory leaks. You can use the previously discussed procedure to figure out memory issues with the Ceph daemons.
18.220.124.177