[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20/33: Try using 2 threads for the server
From: |
Christopher Baines |
Subject: |
20/33: Try using 2 threads for the server |
Date: |
Wed, 14 Aug 2024 05:01:29 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit e8bd27fdb81fb776109ba4d2a57a1432768f100f
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jul 26 21:42:21 2024 +0100
Try using 2 threads for the server
---
guix-data-service/web/server.scm | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm
index 07f05f8..d56066e 100644
--- a/guix-data-service/web/server.scm
+++ b/guix-data-service/web/server.scm
@@ -134,11 +134,21 @@
(run-fibers
(lambda ()
- (catch 'system-error
- (lambda ()
- (set-thread-name
- (string-append "server")))
- (const #t))
+ (let* ((current (current-scheduler))
+ (schedulers
+ (cons current (scheduler-remote-peers current))))
+ (for-each
+ (lambda (i sched)
+ (spawn-fiber
+ (lambda ()
+ (catch 'system-error
+ (lambda ()
+ (set-thread-name
+ (string-append "server " (number->string i))))
+ (const #t)))
+ sched))
+ (iota (length schedulers))
+ schedulers))
(while (not request-scheduler)
(sleep 0.1))
@@ -236,6 +246,6 @@ port. Also, the port used can be changed by passing the
--port option.\n"
(spawn-port-monitoring-fiber port finished?)
(wait finished?))
- #:hz 5
- #:parallelism 1))
+ #:hz 0
+ #:parallelism 2))
finished?)))
- 15/33: Add more fibers utilities, (continued)
- 15/33: Add more fibers utilities, Christopher Baines, 2024/08/14
- 07/33: Stream the package derivation page since it can be large, Christopher Baines, 2024/08/14
- 11/33: Catch and ignore the new cross build derivation errors, Christopher Baines, 2024/08/14
- 19/33: Add worker thread utils, Christopher Baines, 2024/08/14
- 14/33: Insert package derivations earlier, Christopher Baines, 2024/08/14
- 26/33: Move inserting derivations in to the load-new-guix-revision module, Christopher Baines, 2024/08/14
- 21/33: Update tests, Christopher Baines, 2024/08/14
- 05/33: Log more timing infromation about inserting derivations, Christopher Baines, 2024/08/14
- 06/33: Add more time logging in to insert-missing-derivations, Christopher Baines, 2024/08/14
- 27/33: Get the test suite working again, Christopher Baines, 2024/08/14
- 20/33: Try using 2 threads for the server,
Christopher Baines <=
- 22/33: Tweak timeouts in resource-pool-stats, Christopher Baines, 2024/08/14
- 24/33: Stream the render-revision-package-derivations JSON response, Christopher Baines, 2024/08/14
- 28/33: Parallelise inserting package derivation distribution counts, Christopher Baines, 2024/08/14
- 29/33: Start trying to handle GC happening while processing revisions, Christopher Baines, 2024/08/14
- 33/33: Use system-ids for inserting distribution counts, Christopher Baines, 2024/08/14
- 31/33: Reduce chunk size, Christopher Baines, 2024/08/14
- 32/33: Add more logging to backfilling guix_revision_package_derivation_distribution_counts, Christopher Baines, 2024/08/14
- 23/33: Fix the pool metrics, Christopher Baines, 2024/08/14
- 17/33: Reduce the WAL size threshold, Christopher Baines, 2024/08/14
- 25/33: Add the fiberize utility, Christopher Baines, 2024/08/14