Project

General

Profile

Actions

Feature #23237

closed

Ansible installer configures Passenger scaling options

Added by Brett Smith 5 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Story points:
-
Release relationship:
Auto

Description

This ticket is basically "do #23202 for the Ansible installer." The job is made easier by the fact that Ansible already has a systemd override template for the RailsAPI service at source:tools/ansible/roles/arvados_api/templates/cluster.conf.j2; we just need to extend it with lines like this:

Environment=PASSENGER_MAX_POOL_SIZE={{ arvados_api_max_pool_size }}
Environment=PASSENGER_MAX_REQUEST_QUEUE_SIZE={{ arvados_api_max_request_queue_size }}

Add tools/ansible/roles/arvados_api/defaults/main.yml with defaults following the Salt installer's logic:

arvados_api_max_pool_size: "{{ [CPU Core Count] * 2 | int }}" 
arvados_api_max_request_queue_size: "{{ arvados_api_max_pool_size * 2 + 1 }}" 

[CPU Core Count] is a placeholder. There should be an Ansible fact that has this information built-in. Figure out where it is by running ansible -m setup localhost or a similar command and use that.

Test (manually) that this works as expected both with the default settings and a custom arvados_api_max_pool_size set as an inventory variable.


Subtasks 1 (0 open1 closed)

Task #23243: Review 23237-ansible-configures-passenger-scalingResolvedLucas Di Pentima11/05/2025Actions

Related issues 1 (0 open1 closed)

Related to Arvados - Bug #23202: Salt installer missing standalone passenger configsResolvedLucas Di PentimaActions
Actions #1

Updated by Brett Smith 5 months ago

  • Description updated (diff)
Actions #2

Updated by Brett Smith 5 months ago

  • Related to Bug #23202: Salt installer missing standalone passenger configs added
Actions #3

Updated by Brett Smith 5 months ago

  • Assigned To deleted (Stephen Smith)
Actions #4

Updated by Brett Smith 5 months ago

  • Assigned To set to Stephen Smith
Actions #5

Updated by Lucas Di Pentima 5 months ago

  • Subtask #23243 added
Actions #6

Updated by Stephen Smith 5 months ago

  • Status changed from New to In Progress
Actions #7

Updated by Stephen Smith 5 months ago

Changes at arvados|81063721e3498ac9d1270b0216561bec0cfadbd6 branch 23237-ansible-configures-passenger-scaling
Workbench tests developer-run-tests-services-workbench2: #1668
(not sure if there are other appropriate tests that should be run for this)

  • Added the pool size and request queue size to the passenger config template
  • Added defaults to set pool size to nproc, and queue size to pool size * 2 + 1
    • Notes about nproc:
    • It appears to accurately reflect thread count on every system I tested, my laptop with E-cores, an intel nuc with a normal 6c12t configuration, and cloud instances
    • In short, cores includes E-cores and may not be hyperthreaded so simply doubling them doesn't work
    • thread_per_core doesn't seem accurate since on a CPU with E-cores it gives 1 despite the non-e-cores having 2 threads, so multiplying threads_per_core * cores doesn't work either
  • I tested the playbook and verified that it sets the default value correctly, and uses the overridden value from the inventory when set, including calculating the correct new queue size
  • I added another | int conversion to the queue size calculation since the values are stored as strings, I suppose we could also remove the quotes and have them as actual integers but I'm not sure if there's a convention either way.
Actions #8

Updated by Lucas Di Pentima 5 months ago

Confirmed that works great, thanks! LGTM.

Actions #9

Updated by Stephen Smith 5 months ago

  • Status changed from In Progress to Resolved
Actions #10

Updated by Brett Smith about 2 months ago

  • Release set to 84
Actions

Also available in: Atom PDF