From f2f9b154adb8055110df6e98718e283157494226 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 15 Apr 2024 15:06:05 +0100 Subject: Make the number of database reader threads configurable --- scripts/nar-herder.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in index 459526e..67515dc 100644 --- a/scripts/nar-herder.in +++ b/scripts/nar-herder.in @@ -312,10 +312,16 @@ (lambda (opt name arg result) (alist-cons 'parallelism (string->number arg) - (alist-delete 'parallelism result)))))) + (alist-delete 'parallelism result)))) + + (option '("database-reader-threads") #t #f + (lambda (opt name arg result) + (alist-cons 'database-reader-threads + (string->number arg) + (alist-delete 'database-reader-threads result)))))) (define %server-option-defaults - '((port . 8080) + `((port . 8080) (host . "0.0.0.0") (storage-limit . "none") @@ -325,6 +331,10 @@ (recent-changes-limit . 32768) + (database-reader-threads . ,(min (max (current-processor-count) + 2) + 64)) + (parallelism . 1))) (define %check-options -- cgit v1.2.3