diff --git a/5.0-Upgrade.md b/5.0-Upgrade.md index 12dc058c..9b91116e 100644 --- a/5.0-Upgrade.md +++ b/5.0-Upgrade.md @@ -24,7 +24,9 @@ Production testing at GitLab suggests values between `0.001` and `0.010` are bes 5.0 brings two new options to your config which may improve memory usage. -`nakayoshi_fork` calls GC a handful of times and compacts the heap on Ruby 2.7+ before forking. This may reduce memory usage on Pumas on MRI with preload enabled. +#### nakayoshi_fork + +`nakayoshi_fork` calls GC a handful of times and compacts the heap on Ruby 2.7+ before forking. This may reduce memory usage on Pumas on MRI with preload enabled. It's inspired by [Koichi Sasada's work](https://github.com/ko1/nakayoshi_fork). To use it, you can add this to your `puma.rb`: @@ -32,6 +34,8 @@ To use it, you can add this to your `puma.rb`: nakayoshi_fork ``` +#### fork_worker + Puma 5 introduces an experimental new cluster-mode configuration option, `fork_worker` (`--fork-worker` from the CLI). This mode causes Puma to fork additional workers from worker 0, instead of directly from the master process: ```