diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-15 15:06:05 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-15 16:15:05 +0100 |
commit | f2f9b154adb8055110df6e98718e283157494226 (patch) | |
tree | c9de91f3449a7440fbb3e51fceca16c26c0f7683 /scripts | |
parent | c58aa2711a0f9ef84ace1e9dc003c5ce243adb9e (diff) | |
download | nar-herder-f2f9b154adb8055110df6e98718e283157494226.tar nar-herder-f2f9b154adb8055110df6e98718e283157494226.tar.gz |
Make the number of database reader threads configurable
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nar-herder.in | 14 |
1 files changed, 12 insertions, 2 deletions
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 |