diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-04-16 14:39:48 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-04-16 14:39:48 +0300 |
commit | fcc39864dba82e14895afbe841091091366c96bc (patch) | |
tree | 6e0f05495fd6512051224dc85fd3ab495cbf1a24 /gnu/system | |
parent | 76fc36d0a7215979bb74c05840f5a4de4ab5ea93 (diff) | |
parent | 44f9432705d04c069a8acf9e37e3ad856ac0bf82 (diff) | |
download | guix-fcc39864dba82e14895afbe841091091366c96bc.tar guix-fcc39864dba82e14895afbe841091091366c96bc.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts:
gnu/local.mk
gnu/packages/boost.scm
gnu/packages/chez.scm
gnu/packages/compression.scm
gnu/packages/crates-io.scm
gnu/packages/docbook.scm
gnu/packages/engineering.scm
gnu/packages/gcc.scm
gnu/packages/gl.scm
gnu/packages/gtk.scm
gnu/packages/nettle.scm
gnu/packages/python-check.scm
gnu/packages/python-xyz.scm
gnu/packages/radio.scm
gnu/packages/rust.scm
gnu/packages/sqlite.scm
guix/build-system/node.scm
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/vm.scm | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index db8bc0f49a..753eb9c863 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -88,6 +88,13 @@ ;;; ;;; Code: +;; By default, the msize value is 8 KiB, which according to QEMU is +;; insufficient and would degrade performance. The msize value should roughly +;; match the bandwidth of the system's IO (see: +;; https://wiki.qemu.org/Documentation/9psetup#msize). Use 100 MiB as a +;; conservative default. +(define %default-msize-value (* 100 (expt 2 20))) ;100 MiB + (define %linux-vm-file-systems ;; File systems mounted for 'derivation-in-linux-vm'. These are shared with ;; the host over 9p. @@ -103,21 +110,23 @@ (type "9p") (needed-for-boot? #t) (flags '(read-only)) - (options "trans=virtio,cache=loose") + (options (format #f "trans=virtio,cache=loose,msize=~a" + %default-msize-value)) (check? #f)) (file-system (mount-point "/xchg") (device "xchg") (type "9p") (needed-for-boot? #t) - (options "trans=virtio") + (options (format #f "trans=virtio,msize=~a" %default-msize-value)) (check? #f)) (file-system (mount-point "/tmp") (device "tmp") (type "9p") (needed-for-boot? #t) - (options "trans=virtio,cache=loose") + (options (format #f "trans=virtio,cache=loose,msize=~a" + %default-msize-value)) (check? #f)))) (define not-config? @@ -459,6 +468,7 @@ system that is passed to 'populate-root-file-system'." (define* (system-docker-image os #:key (name "guix-docker-image") + (memory-size 256) (register-closures? (has-guix-service-type? os)) shared-network?) "Build a docker image. OS is the desired <operating-system>. NAME is the @@ -552,6 +562,7 @@ the operating system." (expression->derivation-in-linux-vm name build + #:memory-size memory-size #:make-disk-image? #f #:single-file-output? #t #:references-graphs `((,graph ,os))))) @@ -581,7 +592,8 @@ the operating system." (type "9p") (flags (if writable? '() '(read-only))) (options (string-append "trans=virtio" - (if writable? "" ",cache=loose"))) + (if writable? "" ",cache=loose") + ",msize=" (number->string %default-msize-value))) (check? #f) (create-mount-point? #t))))) |