Skip to content
Open
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: 3 additions & 1 deletion config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
worker_count = (Concurrent.processor_count * 0.666).ceil
# Count the CPUs this container may use: its CPU quota when it has one (ONCE's
# CPU limit, `docker run --cpus`), otherwise every CPU it can see.
worker_count = (Concurrent.available_processor_count * 0.666).ceil
workers ENV.fetch("WEB_CONCURRENCY") { worker_count }

ENV["JOB_CONCURRENCY"] ||= worker_count.to_s
Expand Down
2 changes: 1 addition & 1 deletion config/resque-pool.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
default: <%= (Concurrent.processor_count * 0.5).ceil %>
default: <%= (Concurrent.available_processor_count * 0.5).ceil %>
Loading