guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: offload: Use gzip instead of xz for compression on the master.


From: Ludovic Courtès
Subject: 02/02: offload: Use gzip instead of xz for compression on the master.
Date: Fri, 25 Sep 2015 20:36:26 +0000

civodul pushed a commit to branch master
in repository guix.

commit 5ef9d7deeab348e0f714f91a3c02ce4b72bbe3c1
Author: Ludovic Courtès <address@hidden>
Date:   Fri Sep 25 22:21:09 2015 +0200

    offload: Use gzip instead of xz for compression on the master.
    
    * guix/scripts/offload.scm (send-files): Use gzip --fast instead of xz.
---
 guix/scripts/offload.scm |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index c0df03b..d594be1 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -474,14 +474,19 @@ success, #f otherwise."
 
       ;; Compute the subset of FILES missing on MACHINE, and send them in
       ;; topologically sorted order so that they can actually be imported.
+      ;;
+      ;; To reduce load on the machine that's offloading (since it's typically
+      ;; already quite busy, see hydra.gnu.org), compress with gzip rather
+      ;; than xz: For a compression ratio 2 times larger, it is 20 times
+      ;; faster.
       (let* ((files (missing-files (topologically-sorted store files)))
              (pipe  (remote-pipe machine OPEN_WRITE
-                                 '("xz" "-dc" "|"
+                                 '("gzip" "-dc" "|"
                                    "guix" "archive" "--import")
                                  #:quote? #f)))
         (format #t (_ "sending ~a store files to '~a'...~%")
                 (length files) (build-machine-name machine))
-        (call-with-compressed-output-port 'xz pipe
+        (call-with-compressed-output-port 'gzip pipe
           (lambda (compressed)
             (catch 'system-error
               (lambda ()
@@ -489,7 +494,8 @@ success, #f otherwise."
               (lambda args
                 (warning (_ "failed while exporting files to '~a': ~a~%")
                          (build-machine-name machine)
-                         (strerror (system-error-errno args)))))))
+                         (strerror (system-error-errno args))))))
+          #:options '("--fast"))
 
         ;; Wait for the 'lsh' process to complete.
         (zero? (close-pipe pipe))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]