Profiling Ceph memory

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.

How to do it…

  1. Start the memory profiler on a specific daemon:
    # ceph tell osd.0 heap start_profiler
    

    Note

    To auto-start profiler as soon as the ceph OSD daemon starts, set the environment variable as CEPH_HEAP_PROFILER_INIT=true.

  2. It's a good idea to keep the profiler running for a few hours so that it can collect as much information related to memory footprint as possible. At the same time, you can also generate some load on the cluster.
  3. Next, print heap statistics about the memory footprint ...

Get Ceph Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.