From: John Wilkins Date: Thu, 18 Apr 2013 01:25:51 +0000 (-0700) Subject: doc: Moved memory profiling from operations to troubleshooting. X-Git-Tag: v0.61~169 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e6709bf931361f9c82e369c706809c432ff4a40;p=ceph.git doc: Moved memory profiling from operations to troubleshooting. Signed-off-by: John Wilkins --- diff --git a/doc/rados/operations/memory-profiling.rst b/doc/rados/operations/memory-profiling.rst deleted file mode 100644 index dc46dcc888c4..000000000000 --- a/doc/rados/operations/memory-profiling.rst +++ /dev/null @@ -1,96 +0,0 @@ -================== - Memory Profiling -================== - -Ceph OSD and metadata server daemons can generate heap profiles using -``tcmalloc``. To generate heap profiles, ensure you have ``google-perftools`` -installed:: - - sudo apt-get google-perftools - -The profiler dumps output to your ``log file`` directory (i.e., -``/var/log/ceph``). See `Logging and Debugging Config Reference`_ for details. -To view the profiler logs with Google's performance tools, execute the -following:: - - google-pprof -gv {log-path/filename} - -Refer to `Google Heap Profiler`_ for additional details. - -Once you have the heap profiler installed, start your cluster and begin using -the heap profiler. You may enable or disable the heap profiler at runtime, or -ensure that it runs continously. For the following commandline usage, replace -``{daemon-type}`` with ``osd`` or ``mds``, and replace ``daemon-id`` with the -OSD number or metadata server letter. - - -Starting the Profiler ---------------------- - -To start the heap profiler, execute the following:: - - ceph {daemon-type} tell {daemon-id} heap start_profiler - -For example:: - - ceph osd tell 1 heap start_profiler - - -Printing Stats --------------- - -To print out statistics, execute the following:: - - ceph {daemon-type} tell {daemon-id} heap stats - -For example:: - - ceph osd tell 0 heap stats - -.. note:: Printing stats does not require the profiler to be running and does - not dump the heap allocation information to a file. - - -Dumping Heap Information ------------------------- - -To dump heap information, execute the following:: - - ceph {daemon-type} tell {daemon-id} heap dump - -For example:: - - ceph mds tell a heap dump - -.. note:: Dumping heap information only works when the profiler is running. - - -Releasing Memory ----------------- - -To release memory that ``tcmalloc`` has allocated but which is not being used by -the Ceph daemon itself, execute the following:: - - ceph {daemon-type} tell {daemon-id} heap release - -For example:: - - ceph osd tell 2 heap release - - -Stopping the Profiler ---------------------- - -To stop the heap profiler, execute the following:: - - ceph {daemon-type} tell {daemon-id} heap stop_profiler - -For example:: - - ceph {daemon-type} tell {daemon-id} heap stop_profiler - -.. _Logging and Debugging Config Reference: ../../configuration/log-and-debug-ref -.. _Google Heap Profiler: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html - - - diff --git a/doc/rados/troubleshooting/memory-profiling.rst b/doc/rados/troubleshooting/memory-profiling.rst new file mode 100644 index 000000000000..9eb05398ecd3 --- /dev/null +++ b/doc/rados/troubleshooting/memory-profiling.rst @@ -0,0 +1,96 @@ +================== + Memory Profiling +================== + +Ceph OSD and metadata server daemons can generate heap profiles using +``tcmalloc``. To generate heap profiles, ensure you have ``google-perftools`` +installed:: + + sudo apt-get google-perftools + +The profiler dumps output to your ``log file`` directory (i.e., +``/var/log/ceph``). See `Logging and Debugging`_ for details. +To view the profiler logs with Google's performance tools, execute the +following:: + + google-pprof -gv {log-path/filename} + +Refer to `Google Heap Profiler`_ for additional details. + +Once you have the heap profiler installed, start your cluster and begin using +the heap profiler. You may enable or disable the heap profiler at runtime, or +ensure that it runs continously. For the following commandline usage, replace +``{daemon-type}`` with ``osd`` or ``mds``, and replace ``daemon-id`` with the +OSD number or metadata server letter. + + +Starting the Profiler +--------------------- + +To start the heap profiler, execute the following:: + + ceph {daemon-type} tell {daemon-id} heap start_profiler + +For example:: + + ceph osd tell 1 heap start_profiler + + +Printing Stats +-------------- + +To print out statistics, execute the following:: + + ceph {daemon-type} tell {daemon-id} heap stats + +For example:: + + ceph osd tell 0 heap stats + +.. note:: Printing stats does not require the profiler to be running and does + not dump the heap allocation information to a file. + + +Dumping Heap Information +------------------------ + +To dump heap information, execute the following:: + + ceph {daemon-type} tell {daemon-id} heap dump + +For example:: + + ceph mds tell a heap dump + +.. note:: Dumping heap information only works when the profiler is running. + + +Releasing Memory +---------------- + +To release memory that ``tcmalloc`` has allocated but which is not being used by +the Ceph daemon itself, execute the following:: + + ceph {daemon-type} tell {daemon-id} heap release + +For example:: + + ceph osd tell 2 heap release + + +Stopping the Profiler +--------------------- + +To stop the heap profiler, execute the following:: + + ceph {daemon-type} tell {daemon-id} heap stop_profiler + +For example:: + + ceph {daemon-type} tell {daemon-id} heap stop_profiler + +.. _Logging and Debugging: ../log-and-debug +.. _Google Heap Profiler: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html + + +