Skip to content

Commit

Permalink
Set semaphore to 2 for "request_task" API
Browse files Browse the repository at this point in the history
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 lowering the MongoDB cache size to avoid the OOM killer.

see official-stockfish#2003
  • Loading branch information
ppigazzini committed May 16, 2024
1 parent 01d6dbc commit 3b4f122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/fishtest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b4f122

Please sign in to comment.