Sadržaj
Apache 2 tuning
https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534 https://geekflare.com/php-fpm-optimization/ https://serversforhackers.com/c/php-fpm-process-management
#apache testing tools - ab sudo ab -k -n 10000 -c 1000 https://koordinacijahumanitaraca.net/
#apache 2 buddy sudo wget https://raw.githubusercontent.com/richardforth/apache2buddy/master/apache2buddy.pl chmod +x apache2buddy.pl
IF in average one your Apache process consumes (%MEM) is 0.8 and your server RAM is 2GB (2048MB), other applications consumes 250MB, and you want to leave +100MB as a free memory, then: MaxRequestWorkers = (2048MB – 250MB - 100MB) / (0.8 / 100 * 2048MB) = ~ 103
Memory and cores php-fpm
echo Cores = $(( $(lscpu | awk '/^Socket/{ print $2 }') * $(lscpu | awk '/^Core/{ print $4 }') )) ps --no-headers -o "rss,cmd" -C php-fpm8.2 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'