You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Rose, John B" <jb...@utk.edu> on 2015/03/11 23:00:12 UTC

[users@httpd] RAM/CPU calculations when using PHP-FPM and Apache 2.4

Is this the correct process?

To determine how much RAM/CPU to provide for a VM web server, calculate the average RES value in "top" for httpd processes. Then calculate the average RES value for php-fpm processes. Then add those 2 values together. Then multiply by the max number of concurrent connections you want to be able to handle.

Example:

12000 kb
  6640 kb
------------
18.640 mb
   X 512 MaxRequestWorkers
----------------
~9.6 gb  (How much RAM needed to run apache/PHP-FPM. So would add 2 GB for running system)

Then add the average CPU% in "top" for httpd processes + average CPU% for php-fpm and multiply by 512 MaxRequestWorkers.

Example:

Httpd average cpu 4%
Php-fpm average cpu  2%

.06 x 512 = 30.72 cores


The RAM looks reasonable. But the cpu value is much higher than I expected.

Corrections? Constructive comments?

Thanks