diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-12-13 15:01:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-12-13 23:11:53 +0100 |
commit | 34797d8afc3c5f1211a4baf1161de640fc630a2e (patch) | |
tree | 73da4757dbf1aa437d87a8cb23bb0122c6c61aec /guix | |
parent | d1f01e48457f8cac9e64fb9f890332d5d93f430e (diff) | |
download | gnu-guix-34797d8afc3c5f1211a4baf1161de640fc630a2e.tar gnu-guix-34797d8afc3c5f1211a4baf1161de640fc630a2e.tar.gz |
hydra: Invalidate derivation caches after each architecture evaluation.
This reduces max RSS from 1.3G to 1.0G.
* guix/derivations.scm (invalidate-derivation-caches!): New procedure.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Use it. Add 'format'
call.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/derivations.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm index 38cefb6100..97f96d99c1 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -90,6 +90,7 @@ derivation-path->output-paths derivation raw-derivation + invalidate-derivation-caches! map-derivation @@ -841,6 +842,15 @@ output should not be used." (hash-set! %derivation-cache file drv*) drv*))) +(define (invalidate-derivation-caches!) + "Invalidate internal derivation caches. This is mostly useful for +long-running processes that know what they're doing. Use with care!" + ;; Typically this is meant to be used by Cuirass and Hydra, which can clear + ;; caches when they start evaluating packages for another architecture. + (invalidate-memoization! derivation->bytevector) + (invalidate-memoization! derivation-path->base16-hash) + (hash-clear! %derivation-cache)) + (define* (map-derivation store drv mapping #:key (system (%current-system))) "Given MAPPING, a list of pairs of derivations, return a derivation based on |