aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-23 23:31:52 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-23 23:34:17 +0200
commitfce225471128c4a5246342b3aa1b7e53a8066211 (patch)
treeb0b0215faf72c88ec74a20cce602dee15aef55a5 /gnu/system
parentb5460d95e970608bee7a794590be1b051b57d3a3 (diff)
downloadguix-fce225471128c4a5246342b3aa1b7e53a8066211.tar
guix-fce225471128c4a5246342b3aa1b7e53a8066211.tar.gz
vm: Use "cache=loose" for all 9p mounts.
This significantly improves read throughput when running things like "guix hash -r ...". * gnu/system/vm.scm (%linux-vm-file-systems): Add 'flags' for "store". Add "cache=loose" to every file system.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/vm.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 435501d726..a1b595d45d 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -99,21 +99,28 @@
(device "store")
(type "9p")
(needed-for-boot? #t)
- (options "trans=virtio")
+ (flags '(read-only))
+ (options "trans=virtio,cache=loose")
(check? #f))
+
+ ;; The 9p documentation says that cache=loose is "intended for
+ ;; exclusive, read-only mounts", without additional details. In
+ ;; practice it seems to work well for these, and it's much faster than
+ ;; the default cache=none, especially when copying and registering
+ ;; store items.
(file-system
(mount-point "/xchg")
(device "xchg")
(type "9p")
(needed-for-boot? #t)
- (options "trans=virtio")
+ (options "trans=virtio,cache=loose")
(check? #f))
(file-system
(mount-point "/tmp")
(device "tmp")
(type "9p")
(needed-for-boot? #t)
- (options "trans=virtio")
+ (options "trans=virtio,cache=loose")
(check? #f))))
(define not-config?