readme and license update
This commit is contained in:
parent
16130f3305
commit
a7659bb535
2 changed files with 48 additions and 1 deletions
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Chris Moore
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
28
README.md
28
README.md
|
@ -1,2 +1,28 @@
|
|||
# pmcalculator
|
||||
A simple process manager calculator that helps determine the correct values for child processes in PHP-FPM
|
||||
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.
|
||||
|
||||
```bash
|
||||
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.
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue