Installing Oprofile

The easiest way to profile Ceph’s CPU consumption is to use the oprofilesystem-wide profiler.

Installation

If you are using a Debian/Ubuntu distribution, you can install oprofile byexecuting the following:

  1. sudo apt-get install oprofile oprofile-gui

Compiling Ceph for Profiling

To compile Ceph for profiling, first clean everything.

  1. make distclean

Then, export the following settings so that you can see callgraph output.

  1. export CFLAGS="-fno-omit-frame-pointer -O2 -g"

Finally, compile Ceph.

  1. ./autogen.sh
  2. ./configure
  3. make

You can use make -j to execute multiple jobs depending upon your system. Forexample:

  1. make -j4

Ceph Configuration

Ensure that you disable lockdep. Consider setting logging tolevels appropriate for a production cluster. See Ceph Logging and Debuggingfor details.

See the CPU Profiling section of the RADOS Troubleshooting documentation for details on using Oprofile.