2012-11-16 22:57:55 +00:00
|
|
|
=====================
|
|
|
|
Installing Oprofile
|
|
|
|
=====================
|
|
|
|
|
|
|
|
The easiest way to profile Ceph's CPU consumption is to use the `oprofile`_
|
|
|
|
system-wide profiler.
|
|
|
|
|
|
|
|
.. _oprofile: http://oprofile.sourceforge.net/about/
|
|
|
|
|
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
If you are using a Debian/Ubuntu distribution, you can install ``oprofile`` by
|
|
|
|
executing the following::
|
|
|
|
|
|
|
|
sudo apt-get install oprofile oprofile-gui
|
|
|
|
|
|
|
|
|
|
|
|
Compiling Ceph for Profiling
|
|
|
|
============================
|
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
To compile Ceph for profiling, first clean everything. ::
|
2012-11-16 22:57:55 +00:00
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
git clean -dfx
|
2012-11-16 22:57:55 +00:00
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
Finally, compile Ceph. ::
|
2012-11-16 22:57:55 +00:00
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
./do-cmake.sh -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -O2 -g"
|
|
|
|
cd build
|
|
|
|
cmake --build .
|
2012-11-16 22:57:55 +00:00
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
In this command, ``CMAKE_CXX_FLAGS`` is specified. This provides callgraph output.
|
2012-11-16 22:57:55 +00:00
|
|
|
|
|
|
|
Ceph Configuration
|
|
|
|
==================
|
|
|
|
|
2013-04-18 01:18:46 +00:00
|
|
|
Ensure that you disable ``lockdep``. Consider setting logging to
|
2012-11-16 22:57:55 +00:00
|
|
|
levels appropriate for a production cluster. See `Ceph Logging and Debugging`_
|
|
|
|
for details.
|
|
|
|
|
2013-04-18 01:18:46 +00:00
|
|
|
.. _Ceph Logging and Debugging: ../../rados/troubleshooting/log-and-debug
|
2012-11-16 22:57:55 +00:00
|
|
|
|
2013-04-18 01:18:46 +00:00
|
|
|
See the `CPU Profiling`_ section of the RADOS Troubleshooting documentation for details on using Oprofile.
|
2012-11-16 22:57:55 +00:00
|
|
|
|
|
|
|
|
2021-03-14 11:58:51 +00:00
|
|
|
.. _CPU Profiling: ../../rados/troubleshooting/cpu-profiling
|