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:
parent
cd8042e655
commit
fb170aec84
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
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`:
|
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
|
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:
|
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue