Skip to content

Instantly share code, notes, and snippets.

@OGProgrammer
Last active October 30, 2023 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OGProgrammer/2c572e3cb1c7f7fd486d2caea1186fc7 to your computer and use it in GitHub Desktop.
Save OGProgrammer/2c572e3cb1c7f7fd486d2caea1186fc7 to your computer and use it in GitHub Desktop.
PHP Optimization - Longhorn PHP 2023

Commands were tested with Debian - other systems may require diff flags/cmds

* indicate source for more info

Find free/used memory

free -mh

Find PHP FPM Memory Usage *

ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | grep php-fpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment