Project

General

Profile

Actions

Idea #20468

closed

Installer supports nginx/passenger config tuning for performance

Added by Lucas Di Pentima over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Deployment
Start date:
05/04/2023
Due date:
Story points:
-
Release relationship:
Auto

Description

The installer needs to have config knobs for the following:

Controller/RailsAPI node /etc/nginx/nginx.conf

  • worker_processes config (depends on nr of instance cores). Maybe having a setting with the amount of workers per core? Salt may be able to act on the number of cores (grains) without needing to specify it.
  • worker_rlimit_nofile config. This may also need some systemd nginx's unit file tweaking. We're using this setting at 4096.
  • events.worker_connections config. We are using this setting at 1024.

RailsAPI node /etc/nginx/conf.d/mod-http-passenger.conf

  • passenger_max_pool_size config. Same concept as worker_processes above.
  • passenger_max_request_queue_size config. Related to arvados config's API.MaxConcurrentRequests, maybe a 1:1 ratio?

Subtasks 1 (0 open1 closed)

Task #20481: Review 20468-installer-perf-knobsResolvedTom Clegg05/04/2023Actions
Actions #1

Updated by Lucas Di Pentima over 1 year ago

  • Status changed from New to In Progress
Actions #2

Updated by Brett Smith over 1 year ago

Lucas Di Pentima wrote:

  • worker_rlimit_nofile config. This may also need some systemd nginx's unit file tweaking. We're using this setting at 4096.

Quoting systemd.exec(5):

Resource limits not configured explicitly for a unit default to the value configured in [DefaultLimitNOFILE] available in systemd-system.conf(5), and – if not configured there – the kernel [default]…

As long as the system's hard limit is well over 4096, I wouldn't worry about it.

Actions #3

Updated by Lucas Di Pentima over 1 year ago

Updates at 50c726f1a - branch 20468-installer-perf-knobs

  • Adds a couple of optional env vars to local.params (CONTROLLER_NGINX_WORKERS & CONTROLLER_MAX_CONCURRENT_REQUESTS) to be able to easily configure passenger, nginx & controller.
  • Adds better defaults to nginx's worker_rlimit_nofile & events.worker_connections configs.

These changes were only applied to the multi-host case, as the single host can continue using the defaults and it's not meant for production use.

Actions #4

Updated by Lucas Di Pentima over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved
Actions #5

Updated by Peter Amstutz about 1 year ago

  • Release set to 66
Actions

Also available in: Atom PDF