Let's see how to profile memory use for the Ceph daemons running on our nodes:
- Start the memory profiler on a specific daemon:
# ceph tell osd.2 heap start_profiler
To auto-start the profiler as soon as the Ceph osd daemon starts, set the environment variable as CEPH_HEAP_PROFILER_INIT=true. It's a good idea to keep the profiler running for a few hours so that it can collect as much information related to the memory footprint as possible. At the same time, you can also generate some load on the cluster.
- Next, print heap statistics about the memory footprint that the profiler has collected:
# ceph tell osd.2 heap stats
- You can also dump heap stats on a file that can be used later; by default, it will create the dump ...