aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/install.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-12-14 17:26:03 +0100
committerLudovic Courtès <ludo@gnu.org>2014-12-14 17:26:03 +0100
commit61ff0a3a181f093fdcd5d5c7e374db17c5fcd8b9 (patch)
treedeab82a71e05902f0f6c2bb9e8e579377b3ffe91 /gnu/system/install.scm
parent6454b33345f27afce1ff3afba3a0a0beebc02c32 (diff)
downloadpatches-61ff0a3a181f093fdcd5d5c7e374db17c5fcd8b9.tar
patches-61ff0a3a181f093fdcd5d5c7e374db17c5fcd8b9.tar.gz
install: Use a low-memory nscd caching policy.
* gnu/system/install.scm (%nscd-minimal-caches): New variable. (installation-services): Use as 'nscd-service' argument.
Diffstat (limited to 'gnu/system/install.scm')
-rw-r--r--gnu/system/install.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 01e79480b1..ab3fe42ae1 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -145,6 +145,14 @@ configuration template file in the installation system."
#~(unless (file-exists? #$local-template)
(copy-file #$template #$local-template)))))))
+(define %nscd-minimal-caches
+ ;; Minimal in-memory caching policy for nscd.
+ (list (nscd-cache (database 'hosts)
+ (positive-time-to-live (* 3600 12))
+ (negative-time-to-live 20)
+ (persistent? #f)
+ (max-database-size (* 5 (expt 2 20)))))) ;5 MiB
+
(define (installation-services)
"Return the list services for the installation image."
(let ((motd (text-file "motd" "
@@ -206,7 +214,10 @@ You have been warned. Thanks for being so brave.
(console-font-service "tty5")
(console-font-service "tty6")
- (nscd-service))))
+ ;; Since this is running on a USB stick with a unionfs as the root
+ ;; file system, use an appropriate cache configuration.
+ (nscd-service (nscd-configuration
+ (caches %nscd-minimal-caches))))))
(define %issue
;; Greeting.