ccache.bbclass: document CCACHE_MAXSIZE variable

Message ID 20220526231444.608039-1-zach@aquabyte.ai
State New
Headers show
Series ccache.bbclass: document CCACHE_MAXSIZE variable | expand

Commit Message

Zachary T Welch May 26, 2022, 11:14 p.m. UTC
Setting this avoids premature cache object eviction during large builds.

Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
---
 meta/classes/ccache.bbclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Khem Raj May 26, 2022, 11:33 p.m. UTC | #1
you need to send it to oe-core ml

On Thu, May 26, 2022 at 4:15 PM Zach Welch <zach@mandolincreek.net> wrote:
>
> Setting this avoids premature cache object eviction during large builds.
>
> Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
> ---
>  meta/classes/ccache.bbclass | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
> index 4532894c57..913304ab35 100644
> --- a/meta/classes/ccache.bbclass
> +++ b/meta/classes/ccache.bbclass
> @@ -12,7 +12,12 @@
>  #   Set CCACHE_TOP_DIR to a shared dir
>  #   CCACHE_TOP_DIR = /path/to/shared_ccache/
>  #
> -# - TO debug ccahe
> +# - Adjust the ccache size limit to avoid overflow during large builds:
> +#   export CCACHE_MAXSIZE = "100G"
> +#   To find a reasonable limit, set this limit to 0 (no limit), then
> +#   observe how large the ccache directory grows.
> +#
> +# - To debug ccache:
>  #   export CCACHE_DEBUG = "1"
>  #   export CCACHE_LOGFILE = "${CCACHE_DIR}/logfile.log"
>  #   And also set PARALLEL_MAKE = "-j 1" to get make the log in order
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#97282): https://lists.openembedded.org/g/openembedded-devel/message/97282
> Mute This Topic: https://lists.openembedded.org/mt/91366017/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 4532894c57..913304ab35 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -12,7 +12,12 @@ 
 #   Set CCACHE_TOP_DIR to a shared dir
 #   CCACHE_TOP_DIR = /path/to/shared_ccache/
 #
-# - TO debug ccahe
+# - Adjust the ccache size limit to avoid overflow during large builds:
+#   export CCACHE_MAXSIZE = "100G"
+#   To find a reasonable limit, set this limit to 0 (no limit), then
+#   observe how large the ccache directory grows.
+#
+# - To debug ccache:
 #   export CCACHE_DEBUG = "1"
 #   export CCACHE_LOGFILE = "${CCACHE_DIR}/logfile.log"
 #   And also set PARALLEL_MAKE = "-j 1" to get make the log in order