[arvados] created: 2.6.0-487-g881c6b774

git repository hosting git at public.arvados.org
Mon Aug 14 18:49:01 UTC 2023


        at  881c6b774b036d82aef3d2df822c8a2b3ff4c3df (commit)


commit 881c6b774b036d82aef3d2df822c8a2b3ff4c3df
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Mon Aug 14 14:41:39 2023 -0400

    20680: Set concurrency to num_cpus * 2 with a minimum of 8
    
    In practice it makes sense to have two workers per core because
    workers usually spend at least half their time waiting on the
    database.
    
    Setting a minimum concurrency of 8 avoids a deadlock situation when
    controller calls keep-web, which calls back to controller.
    
    This doesn't completely eliminate the problem, but it at least avoids
    having deadlocked requests with a single user in the default
    configuration (!).
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
index 58a7851c2..301790088 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
@@ -3,7 +3,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-{%- set max_workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus'])|int %}
+{%- set _workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus']*2)|int %}
+{%- set max_workers = [_workers, 8]|max %}
 {%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %}
 
 # The variables commented out are the default values that the formula uses.
diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls
index ce8f0ff40..4c0aea25f 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls
@@ -12,7 +12,8 @@
 {%- set passenger_ruby = '/usr/local/rvm/wrappers/default/ruby'
                            if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') else
                          '/usr/bin/ruby' %}
-{%- set max_workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus'])|int %}
+{%- set _workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus']*2)|int %}
+{%- set max_workers = [_workers, 8]|max %}
 {%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %}
 
 ### NGINX

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list