[libvirt-jenkins-ci PATCH 2/7] lcitool: Configure ccache using environment variables

Daniel P. Berrangé berrange at redhat.com
Mon Mar 30 11:45:16 UTC 2020


On Fri, Mar 27, 2020 at 08:34:54PM +0100, Andrea Bolognani wrote:
> We're going to stop creating $HOME/.ccache soon, so we need an
> alternative way to configure ccache; environment variables work
> perfectly fine.
> 
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  guests/playbooks/update/tasks/users.yml          | 7 -------
>  guests/playbooks/update/templates/bashrc.j2      | 1 +
>  guests/playbooks/update/templates/ccache.conf.j2 | 1 -
>  3 files changed, 1 insertion(+), 8 deletions(-)
>  delete mode 100644 guests/playbooks/update/templates/ccache.conf.j2

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


> diff --git a/guests/playbooks/update/templates/bashrc.j2 b/guests/playbooks/update/templates/bashrc.j2
> index 9cea90c..898d30b 100644
> --- a/guests/playbooks/update/templates/bashrc.j2
> +++ b/guests/playbooks/update/templates/bashrc.j2
> @@ -5,6 +5,7 @@ export NINJA="{{ ninja }}"
>  export PYTHON="{{ python }}"
>  
>  export MAKEFLAGS="-j{{ install_vcpus|int + 1 }}"
> +export CCACHE_MAXSIZE="2G"

I was wondering what a good size for ccache would be. Is there any history
to why we picked 2G ?  Having it too big didn't really matter for the
Jenkins builders as it is kept local.  For GitLab the cache is downloaded
at start of the job off cloud cstorage. So we want it large enough to fit
a libvirt.git compile but small enough that outdated cruft gets purged
reasonably quickly, so we don't waste time in GitLab CI downloading GB's
of data that is no longer needed in the cache.

NB, this is NOT an objection to this patch, as 2GB is a pre-existing value
we used. Just want to know how we should consider tuning it in future.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list