From e7c92b9508f096a46cf8149deeb7e853cb5edd7c Mon Sep 17 00:00:00 2001 From: ppigazzini Date: Thu, 16 May 2024 12:41:28 +0200 Subject: [PATCH] Set semaphore to 2 for "request_task" API Tested working fine with a fleet of 75k cores 10k machines, Waitress configured with threads=4 and connection_limit=100 HW usage: RAM 72%, primary Waitress instance CPU 85-95% This is a good compromise for threads "privileged" for "request_task" API, and threads free for any other APIs, while keeping Waitress threads=4. Raising the number of Waitress threads uses more RAM, and can requires to lower the MongoDB cache size to avoid the OOM killer. see #2003 --- server/fishtest/rundb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fishtest/rundb.py b/server/fishtest/rundb.py index 806e40f4fe..e71bea4a2f 100644 --- a/server/fishtest/rundb.py +++ b/server/fishtest/rundb.py @@ -679,7 +679,7 @@ def update_workers_cores(self, run): # Limit concurrent request_task task_lock = threading.Lock() - task_semaphore = threading.Semaphore(4) + task_semaphore = threading.Semaphore(2) task_time = 0 task_runs = None