doc/dev/cpu-profiler.rst
The easiest way to profile Ceph's CPU consumption is to use the oprofile_
system-wide profiler.
.. _oprofile: http://oprofile.sourceforge.net/about/
If you are using a Debian/Ubuntu distribution, you can install oprofile by
executing the following::
sudo apt-get install oprofile oprofile-gui
To compile Ceph for profiling, first clean everything. ::
git clean -dfx
Finally, compile Ceph. ::
./do-cmake.sh -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -O2 -g"
cd build
cmake --build .
In this command, CMAKE_CXX_FLAGS is specified. This provides callgraph output.
Ensure that you disable lockdep. Consider setting logging to
levels appropriate for a production cluster. See Ceph Logging and Debugging_
for details.
.. _Ceph Logging and Debugging: ../../rados/troubleshooting/log-and-debug
See the CPU Profiling_ section of the RADOS Troubleshooting documentation for details on using Oprofile.
.. _CPU Profiling: ../../rados/troubleshooting/cpu-profiling