]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Add alternative memory profiling to doc 45284/head
authorTobias Urdin <tobias.urdin@binero.se>
Mon, 7 Mar 2022 19:42:54 +0000 (19:42 +0000)
committerTobias Urdin <tobias.urdin@binero.se>
Mon, 7 Mar 2022 19:57:47 +0000 (19:57 +0000)
This adds documentation about alternative
memory profiling options for services such
as RadosGW using the Massif heap memory profiler
with Valgrind.

That was used to produce output like served
in the bug report [1]

[1] https://tracker.ceph.com/issues/54482

Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
doc/rados/troubleshooting/memory-profiling.rst

index e2396e2fd3f2360374e8b38382b235268d0f06e8..85146653b4a304fb855d30f68ac06db9a7f71d4a 100644 (file)
@@ -140,3 +140,32 @@ For example::
 
 .. _Logging and Debugging: ../log-and-debug
 .. _Google Heap Profiler: http://goog-perftools.sourceforge.net/doc/heap_profiler.html
+
+Alternative ways for memory profiling
+-------------------------------------
+
+Running Massif heap profiler with Valgrind
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The Massif heap profiler tool can be used with Valgrind to
+measure how much heap memory is used and is good for
+troubleshooting for example Ceph RadosGW.
+
+See the `Massif documentation <https://valgrind.org/docs/manual/ms-manual.html>`_ for
+more information.
+
+Install Valgrind from the package manager for your distribution
+then start the Ceph daemon you want to troubleshoot::
+
+        sudo -u ceph valgrind --max-threads=1024 --tool=massif /usr/bin/radosgw -f --cluster ceph --name NAME --setuser ceph --setgroup ceph
+
+A file similar to ``massif.out.<pid>`` will be saved when it exits
+in your current working directory. The user running the process above
+must have write permissions in the current directory.
+
+You can then run the ``ms_print`` command to get a graph and statistics
+from the collected data in the ``massif.out.<pid>`` file::
+
+        ms_print massif.out.12345
+
+This output is great for inclusion in a bug report.