From 1d9558ac42a69a37c4ea5150f87f17acdbfb3375 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Wed, 12 Apr 2017 15:08:00 +0200 Subject: [PATCH] doc: dev add a note about ccache Signed-off-by: Abhishek Lekshmanan --- doc/dev/index.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/dev/index.rst b/doc/dev/index.rst index 6f480f4b9a9e6..d516cb010ae68 100644 --- a/doc/dev/index.rst +++ b/doc/dev/index.rst @@ -165,6 +165,39 @@ Building from source See instructions at :doc:`/install/build-ceph`. +Using ccache to speed up local builds +------------------------------------- + +Rebuilds of the ceph source tree can benefit significantly from use of `ccache`_. +Many a times while switching branches and such, one might see build failures for +certain older branches mostly due to older build artifacts. These rebuilds can +significantly benefit the use of ccache. For a full clean source tree, one could +do :: + + $ make clean + + # note the following will nuke everything in the source tree that + # isn't tracked by git, so make sure to backup any log files /conf options + + $ git clean -fdx; git submodule foreach git clean -fdx + +ccache is available as a package in most distros. To build ceph with ccache one +can:: + + $ cmake -DWITH_CCACHE=ON .. + +ccache can also be used for speeding up all builds in the system. for more +details refer to the `run modes`_ of the ccache manual. The default settings of +``ccache`` can be displayed with ``ccache -s``. + +.. note: It is recommended to override the ``max_size``, which is the size of + cache, defaulting to 10G, to a larger size like 25G or so. Refer to the + `configuration`_ section of ccache manual. + +.. _`ccache`: https://ccache.samba.org/ +.. _`run modes`: https://ccache.samba.org/manual.html#_run_modes +.. _`configuration`: https://ccache.samba.org/manual.html#_configuration + Development-mode cluster ------------------------ -- 2.47.3