Explorar el Código

[ruby/padrino] Don't hardcode number of workers to 8 for Puma (#9681)

Use autotune instead as the server can handle a lot more than 8 threads.
Petrik de Heus hace 6 meses
padre
commit
a807ce89a7

+ 1 - 1
frameworks/Ruby/padrino/config/auto_tune.rb

@@ -9,7 +9,7 @@ KB_PER_WORKER = 128 * 1_024 # average of peak PSS of single-threaded processes (
 MIN_WORKERS = 2
 MAX_WORKERS_PER_VCPU = 1.25 # virtual/logical
 MIN_THREADS_PER_WORKER = 1
-MAX_THREADS = Integer(ENV['MAX_CONCURRENCY'] || 8)
+MAX_THREADS = Integer(ENV['MAX_CONCURRENCY'] || 256)
 
 def meminfo(arg)
   File.open('/proc/meminfo') do |f|

+ 1 - 1
frameworks/Ruby/padrino/padrino.dockerfile

@@ -16,4 +16,4 @@ EXPOSE 8080
 
 ENV RUBY_YJIT_ENABLE=1
 
-CMD bundle exec puma -C config/puma.rb -w 8 --preload
+CMD bundle exec puma -C config/puma.rb