aboutsummaryrefslogtreecommitdiff
path: root/scripts/guix-data-service.in
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-10-02 15:08:18 +0100
committerChristopher Baines <mail@cbaines.net>2022-10-02 15:08:18 +0100
commitff77bbea7e647a07c5601e51704c04258a73b79f (patch)
tree27bc83b7a83e143b1869be17eb99b9330f89629d /scripts/guix-data-service.in
parentce2e13aa45211492950595c3758467488023c3f9 (diff)
downloaddata-service-ff77bbea7e647a07c5601e51704c04258a73b79f.tar
data-service-ff77bbea7e647a07c5601e51704c04258a73b79f.tar.gz
Make it possible to increase the number of thread pool threads
And double the default to 16.
Diffstat (limited to 'scripts/guix-data-service.in')
-rw-r--r--scripts/guix-data-service.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index e0b35c6..5f0dc25 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -33,6 +33,7 @@
(system repl repl)
(gcrypt pk-crypto)
(guix pki)
+ (guix-data-service utils)
(guix-data-service config)
(guix-data-service database)
(guix-data-service substitutes)
@@ -91,6 +92,12 @@
(alist-cons 'host
arg
(alist-delete 'host result))))
+ (option '("thread-pool-threads") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'thread-pool-threads
+ (string->number arg)
+ (alist-delete 'thread-pool-threads
+ result))))
(option '("postgresql-statement-timeout") #t #f
(lambda (opt name arg result)
(alist-cons 'postgresql-statement-timeout
@@ -111,6 +118,7 @@
(_ #t)))
(port . 8765)
(host . "0.0.0.0")
+ (thread-pool-threads . 16)
(postgresql-statement-timeout . 60000)))
@@ -171,7 +179,10 @@
(current-error-port))
#f)))
(%show-error-details
- (assoc-ref opts 'show-error-details)))
+ (assoc-ref opts 'show-error-details))
+
+ (%thread-pool-threads
+ (assoc-ref opts 'thread-pool-threads)))
(let* ((startup-completed
(make-atomic-box