Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring Puma to set worker count to number of detected cores #500

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,10 @@ properties:
description: "Use co-deployed Valkey (Redis fork) for rate limiting and metrics. If the Puma webserver is enabled, Valkey will automatically be used."
default: false

cc.puma.automatic_worker_count:
description: "Sets the number of Puma workers to the number of detected cores. See https://github.com/puma/puma?tab=readme-ov-file#clustered-mode for information on how cores are detected. If set to 'true', the value set for `cc.puma.workers` will be ignored."
default: false

cc.puma.workers:
description: "Number of workers for Puma webserver."
default: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ tls_port: <%= p("cc.tls_port") %>
internal_service_hostname: <%= p("cc.internal_service_hostname") %>
webserver: <%= thin_webserver_enabled? ? 'thin' : 'puma' %>
puma:
automatic_worker_count: <%= p("cc.puma.automatic_worker_count") %>
workers: <%= p("cc.puma.workers") %>
max_threads: <%= p("cc.puma.max_threads") %>
<% if_p("cc.puma.max_db_connections_per_process") do |max_db_conn_per_process| %>
Expand Down
Loading