1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Update 5.0-Upgrade.md

This commit is contained in:
Nate Berkopec 2020-05-11 17:19:16 +09:00 committed by GitHub
parent cd8042e655
commit fb170aec84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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:
```