Skip to content

A simple process manager calculator that helps determine the correct values for child processes in PHP-FPM

License

Notifications You must be signed in to change notification settings

mhodge/pmcalculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmcalculator 🏗️

A simple process manager calculator that helps determine the correct values for child processes in PHP-FPM.

Usage ✌️

To find the correct process manager values, you will have to measure how much memory the average process consumes. This may not always be possible unless the process uses very stable and repeating memory amounts. For environments with many different processes, such as shared hosting environments, it may be better to monitor the processes, noting peaks every so often in order to calculate an average. Using the process status (ps) command in Linux, sorting by RSS (Resident Set Size) to show the process with the highest memory usage first.

ps -ylC php-fpm --sort:rss
  • The name php-fpm matches your process name. In many cases this will need to be changed to match the actual process such as php7.0-fpm.
  • The column RSS contains the average memory usage in kilobytes per process.
S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD
S     0 24439     1  0  80   0  6364 57236 -      ?        00:00:00 php-fpm
S    33 24701 24439  2  80   0 61588 63335 -      ?        00:04:07 php-fpm
S    33 25319 24439  2  80   0 61620 63314 -      ?        00:02:35 php-fpm

In this example 61588 kilobytes or converted about +- 60 Mb per process.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Demo: https://spot13.com/pmcalculator

About

A simple process manager calculator that helps determine the correct values for child processes in PHP-FPM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 66.1%
  • JavaScript 26.8%
  • CSS 7.1%