puma.rb 452 B

12345678910111213
  1. require_relative 'auto_tune'
  2. # FWBM only... use the puma_auto_tune gem in production!
  3. num_workers, num_threads = auto_tune
  4. workers num_workers
  5. threads num_threads, num_threads
  6. # Use the `preload_app!` method when specifying a `workers` number.
  7. # This directive tells Puma to first boot the application and load code
  8. # before forking the application. This takes advantage of Copy On Write
  9. # process behavior so workers use less memory.
  10. #
  11. preload_app!