Mailing List Archive

Apache (php) Average process size with Event module
Hello,



We have been apache users for many years.



Until now and in previous apache versions , by default, in the
Multi-Processing Module the prefork and worker modules were used. Now in the
latest versions Event is used.



We have been doing tests (with php (wordpress web)) and it seems that the
amount of memory occupied by the processes is much higher.

We have also verified that having several CPUs the amount of memory occupied
by each process is greater than if you have a single CPU.

In others servers with apache 2.2.34 (for example) and Prefork module the
Average process size (MB) is around 80.

Now, with event module is around 250-500 (see below)



Do you have information about it?

How can I calculate the configuration parameters?



This is the default configuration

<IfModule mpm_event_module>

Start Servers 3

MinSpareThreads 75

Max Spare Threads 250

Threads Per Child 25

MaxRequestWorkers 400

MaxConnectionsPerChild 0

</IfModule>





We are monitoring it with this command:

ps -ylC httpd | awk '{x += $8;y += 1} END { print "Apache memory usage (MB):
"x/1024; print " Average process size (MB): "x/((y-1)*1024); print "Apache
Process: "y-1;}'



TEST 1: 1CPU & 4GB RAM => Apache memory usage (MB): 1141.29 | Average
process size (MB): 228.257 | Apache Process: 5

TEST 2: 2CPU With 1 Socket & 4GB RAM => Apache memory usage (MB): 2882.71
| Average process size (MB): 576.543| Apache Process: 5

TEST 3: 2CPU With 2 Socket & 4GB RAM => Apache memory usage (MB): 2008.18|
Average process size (MB): 401.636| Apache Process: 5





Regards,



Carlos
Re: Apache (php) Average process size with Event module [ In reply to ]
> In others servers with apache 2.2.34 (for example) and Prefork module the Average process size (MB) is around 80.
> Now, with event module is around 250-500 (see below)
> Threads Per Child 25

Should be about 25 times fewer processes for the same workload, so
comparing the average per process is a little misleading.

Hopefully you are not using mod_php with event. You should consider
using mod_proxy_fcgi so PHP is not embedded in every httpd process.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org