From 016f00dfb5835999755401c7f0009a0a733418db Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 10 Oct 2025 15:17:13 -0400 Subject: [PATCH] Call Process.warmup --- config/puma.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/puma.rb b/config/puma.rb index 68fefbb71..402e41520 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -24,3 +24,11 @@ plugin :yabeda_prometheus # https://edgeguides.rubyonrails.org/tuning_performance_for_deployment.html#puma workers Concurrent.physical_processor_count threads 1, 1 + +# Tell the Ruby VM that we're finished booting up. +# +# Now's the time to tidy the heap (GC, compact, free empty, malloc_trim, etc) +# for optimal copy-on-write efficiency. +before_fork do + Process.warmup +end