offload: Use gzip instead of xz for compression on the master.
* guix/scripts/offload.scm (send-files): Use gzip --fast instead of xz.
This commit is contained in:
parent
62d2b57157
commit
5ef9d7deea
|
@ -474,14 +474,19 @@ success, #f otherwise."
|
||||||
|
|
||||||
;; Compute the subset of FILES missing on MACHINE, and send them in
|
;; Compute the subset of FILES missing on MACHINE, and send them in
|
||||||
;; topologically sorted order so that they can actually be imported.
|
;; 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)))
|
(let* ((files (missing-files (topologically-sorted store files)))
|
||||||
(pipe (remote-pipe machine OPEN_WRITE
|
(pipe (remote-pipe machine OPEN_WRITE
|
||||||
'("xz" "-dc" "|"
|
'("gzip" "-dc" "|"
|
||||||
"guix" "archive" "--import")
|
"guix" "archive" "--import")
|
||||||
#:quote? #f)))
|
#:quote? #f)))
|
||||||
(format #t (_ "sending ~a store files to '~a'...~%")
|
(format #t (_ "sending ~a store files to '~a'...~%")
|
||||||
(length files) (build-machine-name machine))
|
(length files) (build-machine-name machine))
|
||||||
(call-with-compressed-output-port 'xz pipe
|
(call-with-compressed-output-port 'gzip pipe
|
||||||
(lambda (compressed)
|
(lambda (compressed)
|
||||||
(catch 'system-error
|
(catch 'system-error
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -489,7 +494,8 @@ success, #f otherwise."
|
||||||
(lambda args
|
(lambda args
|
||||||
(warning (_ "failed while exporting files to '~a': ~a~%")
|
(warning (_ "failed while exporting files to '~a': ~a~%")
|
||||||
(build-machine-name machine)
|
(build-machine-name machine)
|
||||||
(strerror (system-error-errno args)))))))
|
(strerror (system-error-errno args))))))
|
||||||
|
#:options '("--fast"))
|
||||||
|
|
||||||
;; Wait for the 'lsh' process to complete.
|
;; Wait for the 'lsh' process to complete.
|
||||||
(zero? (close-pipe pipe))))))
|
(zero? (close-pipe pipe))))))
|
||||||
|
|
Loading…
Reference in New Issue