diff options
author | John Wilkins <john.wilkins@inktank.com> | 2012-11-16 23:58:22 +0100 |
---|---|---|
committer | John Wilkins <john.wilkins@inktank.com> | 2012-11-16 23:58:22 +0100 |
commit | c42af8030ff414c8c843b8f661ac80a7db385bfd (patch) | |
tree | fa6e5fa65ed2466688803276200e23dfa935c150 /doc | |
parent | doc: Added documentation for installing CPU profiler. (diff) | |
download | ceph-c42af8030ff414c8c843b8f661ac80a7db385bfd.tar.xz ceph-c42af8030ff414c8c843b8f661ac80a7db385bfd.zip |
doc: Added documentation for using CPU profiler.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/rados/operations/cpu-profiling.rst | 67 | ||||
-rw-r--r-- | doc/rados/operations/index.rst | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/doc/rados/operations/cpu-profiling.rst b/doc/rados/operations/cpu-profiling.rst new file mode 100644 index 00000000000..e46c5cab594 --- /dev/null +++ b/doc/rados/operations/cpu-profiling.rst @@ -0,0 +1,67 @@ +=============== + CPU Profiling +=============== + +If you built Ceph from source and compiled Ceph for use with `oprofile`_ +you can profile Ceph's CPU usage. See `Installing Oprofile`_ for details. + + +Initializing oprofile +===================== + +The first time you use ``oprofile`` you need to initialize it. Locate the +``vmlinux`` image corresponding to the kernel you are now running. :: + + ls /boot + sudo opcontrol --init + sudo opcontrol --setup --vmlinux={path-to-image} --separate=library --callgraph=6 + + +Starting oprofile +================= + +To start ``oprofile`` execute the following command:: + + opcontrol --start + +Once you start ``oprofile``, you may run some tests with Ceph. + + +Stopping oprofile +================= + +To stop ``oprofile`` execute the following command:: + + opcontrol --stop + + +Retrieving oprofile Results +=========================== + +To retrieve the top ``cmon`` results, execute the following command:: + + opreport -gal ./cmon | less + + +To retrieve the top ``cmon`` results with call graphs attached, execute the +following command:: + + opreport -cal ./cmon | less + +.. important:: After reviewing results, you should reset ``oprofile`` before + running it again. Resetting ``oprofile`` removes data from the session + directory. + + +Resetting oprofile +================== + +To reset ``oprofile``, execute the following command:: + + sudo opcontrol --reset + +.. important:: You should reset ``oprofile`` after analyzing data so that + you do not commingle results from different tests. + +.. _oprofile: http://oprofile.sourceforge.net/about/ +.. _Installing Oprofile: ../../../install/cpu-profiler diff --git a/doc/rados/operations/index.rst b/doc/rados/operations/index.rst index 8c08b62e8f1..5829eea257d 100644 --- a/doc/rados/operations/index.rst +++ b/doc/rados/operations/index.rst @@ -14,6 +14,7 @@ and, monitoring an operating cluster. operating monitoring + cpu-profiling troubleshooting debug |