Merge branch '21285-installer-updates'. Closes #21285
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 12 Jan 2024 21:27:39 +0000 (18:27 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 12 Jan 2024 21:27:39 +0000 (18:27 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

tools/salt-install/config_examples/multi_host/aws/dashboards/arvados_overview.json
tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
tools/salt-install/config_examples/multi_host/aws/pillars/nginx_balancer_configuration.sls
tools/salt-install/config_examples/multi_host/aws/pillars/nginx_passenger.sls
tools/salt-install/local.params.example.multiple_hosts
tools/salt-install/provision.sh

index 774109b531d66ecbea1d4fedfe317a9361538c89..3b3fd83270eac66a257026f57deeb6038739453c 100644 (file)
           },
           "expr": "arvados_concurrent_requests{}",
           "interval": "",
-          "legendFormat": "{{instance}}",
+          "legendFormat": "{{instance}}_{{queue}}",
           "refId": "A"
         }
       ],
index bd95c5a868345487705df68afb4e540fa661807f..16e686ab8069747227a9a206c100496f2929b8ce 100644 (file)
@@ -6,6 +6,7 @@
 {%- 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 %}
+{%- set max_tunnels = ("__CONTROLLER_MAX_GATEWAY_TUNNELS__" or 1000)|int %}
 {%- set database_host = ("__DATABASE_EXTERNAL_SERVICE_HOST_OR_IP__" or "__DATABASE_INT_IP__") %}
 {%- set database_name = "__DATABASE_NAME__" %}
 {%- set database_user = "__DATABASE_USER__" %}
@@ -121,6 +122,7 @@ arvados:
       MaxConcurrentRailsRequests: {{ max_workers * 2 }}
       MaxConcurrentRequests: {{ max_reqs }}
       MaxQueuedRequests: {{ max_reqs }}
+      MaxGatewayTunnels: {{ max_tunnels }}
 
     ### CONTAINERS
     {%- set dispatcher_ssh_privkey = "__DISPATCHER_SSH_PRIVKEY__" %}
index a3a3d405f1de5bd2ac4600989d1f8325ce10ea9d..485cf9c12f67342584a7e1c06ffa4b501ae3d466 100644 (file)
@@ -9,21 +9,16 @@
 {%- set controller_nr = balancer_backends|length %}
 {%- set disabled_controller = "__DISABLED_CONTROLLER__" %}
 {%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %}
+{%- set max_tunnels = ("__CONTROLLER_MAX_GATEWAY_TUNNELS__" or 1000)|int %}
 
 ### NGINX
 nginx:
   ### SERVER
   server:
     config:
-      {%- if max_reqs != "" %}
-      worker_rlimit_nofile: {{ (max_reqs|int * 3 * controller_nr)|round|int }}
+      worker_rlimit_nofile: {{ (max_reqs + max_tunnels) * 5 * controller_nr }}
       events:
-        worker_connections: {{ (max_reqs|int * 3 * controller_nr)|round|int }}
-      {%- else %}
-      worker_rlimit_nofile: 4096
-      events:
-        worker_connections: 1024
-      {%- endif %}
+        worker_connections: {{ (max_reqs + max_tunnels) * 5 * controller_nr }}
       ### STREAMS
       http:
         'geo $external_client':
index 82f1b91bb5ba4efb997f9f7da2c14b4a58f13e81..0c9ef1c36e6ff8629ac5b14158fb4b9d6fa57da4 100644 (file)
@@ -15,6 +15,7 @@
 {%- 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 %}
+{%- set max_tunnels = ("__CONTROLLER_MAX_GATEWAY_TUNNELS__" or 1000)|int %}
 
 ### NGINX
 nginx:
@@ -50,13 +51,14 @@ nginx:
       {% endif %}
       worker_processes: {{ max_workers }}
 
-      # each request is up to 3 connections (1 with client, 1 proxy to
+      # Each client request is up to 3 connections (1 with client, 1 proxy to
       # controller, then potentially 1 from controller back to
       # passenger).  Each connection consumes a file descriptor.
       # That's how we get these calculations
-      worker_rlimit_nofile: {{ max_reqs * 3 + 1 }}
+      # (we're multiplying by 5 instead to be on the safe side)
+      worker_rlimit_nofile: {{ (max_reqs + max_tunnels) * 5 + 1 }}
       events:
-        worker_connections: {{ max_reqs * 3 + 1 }}
+        worker_connections: {{ (max_reqs + max_tunnels) * 5 + 1 }}
 
   ### SITES
   servers:
index 909c3354ec15d88ce97328ed148a20e1895c581a..d97afaca1c4e82e2c8c62622b1acbcfc6843a77a 100644 (file)
@@ -148,9 +148,11 @@ DATABASE_USER="${CLUSTER}_arvados"
 #DATABASE_POSTGRESQL_VERSION=
 
 # Performance tuning parameters.  If these are not set, workers
-# defaults on the number of cpus and queued requests defaults to 128.
+# defaults on the number of cpus, queued requests defaults to 128
+# and gateway tunnels defaults to 1000.
 #CONTROLLER_MAX_WORKERS=
 #CONTROLLER_MAX_QUEUED_REQUESTS=
+#CONTROLLER_MAX_GATEWAY_TUNNELS=
 
 # The directory to check for the config files (pillars, states) you want to use.
 # There are a few examples under 'config_examples'.
index bb4a4c6eb59e6861114a7e4137ad649364e8381b..eb09dddf2c9fd69101f3e73f39945208b6a21e69 100755 (executable)
@@ -206,6 +206,7 @@ apply_var_substitutions() {
        s#__SSL_KEY_AWS_SECRET_NAME__#${SSL_KEY_AWS_SECRET_NAME}#g;
        s#__CONTROLLER_MAX_WORKERS__#${CONTROLLER_MAX_WORKERS:-}#g;
        s#__CONTROLLER_MAX_QUEUED_REQUESTS__#${CONTROLLER_MAX_QUEUED_REQUESTS:-128}#g;
+       s#__CONTROLLER_MAX_GATEWAY_TUNNELS__#${CONTROLLER_MAX_GATEWAY_TUNNELS:-1000}#g;
        s#__MONITORING_USERNAME__#${MONITORING_USERNAME}#g;
        s#__MONITORING_EMAIL__#${MONITORING_EMAIL}#g;
        s#__MONITORING_PASSWORD__#${MONITORING_PASSWORD}#g;