Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my Apache 2.4.2 server with a standard mod_php Prefork setup these are my server-status results

Current Time: Wednesday, 24-Oct-2012 19:36:24 CDT
Restart Time: Wednesday, 24-Oct-2012 01:27:30 CDT
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 18 hours 8 minutes 54 seconds
Total accesses: 14304233 - Total Traffic: 342.3 GB
CPU Usage: u12584.6 s721.93 cu.66 cs3.43 - 20.4% CPU load
219 requests/sec - 5.4 MB/second - 25.1 kB/request
507 requests currently being processed, 355 idle workers
______KKKKR_K______W_KKC___CKK_K_K_W__CC_KKK_KK._K_K_KK._KKKK_K_
K_____KK_KKKK_K_KK__K___KK_K___K_____CKKK_WK_K_____KCKK__K___K_K
K_CK_K_K_____K__KKKK_K__K___K_KK_K_K_KKKCK____________KK_CK__KKK
__C_KKKKKKK___CK___C_KKK_K__C__K_CK____KKK__K__K__K_K__KK_CK_K__
_KKKKK_K_W__KK______K___K__W___C_K__K____KKKKKKKK.KKKKKKKCK_K___
_C_KK_K_WK__K_KK__K__RK_KK___K____K_KK_K_K___RKC_KKKK___KKKC_K_W
_C_KK_KK__W____KC__KKK__KKK___K___KKK_KK_K_KKW__K_KR_KK_KK__KKK_
R__KKK__KKKKKK__K_KKKKK_K__K_K___KKW_________KK_K___KKK___KK.K_C
KKKKKKW_____K__K_KKC_KCKK_K_KK_K__KK__K___K__KK_KK__________KK__
__K___KK_K__K_C_KK_K___KK__KK__K__KCK_K__KK_________K_K_KK__.K__
K_CKK.CCRW__KKKKKKKKKKKC__W____K___KWK_KK_KKC______.K_K_KK_KKKC_
__KKK_W_KCKKK_K_K____CCCK__KC_KKKK_K____K_CK_K____K__K____KKK_KK
KK___K_K_K__KW__KCKKKK____WKWK__K_KKRKK__C_K_KK_KK_K__KKCC_K__C_
KK_K___K_KK______K_____CKK_K_______KK_CKCK__KKKKK____K__K..K____
__KKWK_KW__KKK__K_KKK___K_KK_KKK__KK___KK___KK_KK___KK____KKWKKC
KK_KKKK_................................`

When I switch to a PHP-FPM setup with the Event MPM with no other variables changes, my requests/sec plummet and overall apache response is garbage.

Current Time: Wednesday, 24-Oct-2012 19:51:21 CDT
Restart Time: Wednesday, 24-Oct-2012 19:48:03 CDT
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 3 minutes 18 seconds
Total accesses: 18720 - Total Traffic: 307.1 MB
CPU Usage: u16.57 s4.74 cu0 cs0 - 10.8% CPU load
94.5 requests/sec - 1.6 MB/second - 16.8 kB/request
15 requests currently being processed, 49 idle workers
PID Connections Threads Async connections
total   accepting   busy    idle    writing keep-alive  closing
11701   114 no  10  22  0   66  38
11702   134 no  5   27  0   81  48
Sum 248     15  49  0   147 86
__R_R__W___RRW________RR__R___W_W_______W_____W_____________R_R_

Is there any obvious reason anyone could think of why this would be the case. I can provide any other additional stats or server setup info to help out. Ive tried tweaking everything up and down and nothing really helps get the PHP-FPM setup anywhere near a baseic prefork/mod-php setup.

Thanks!

share|improve this question

1 Answer 1

When you say no other variable changes, do you mean you're using the same httpd.conf values as prefork? If so, yes, that would explain your results.

You need to set MaxRequestsPerChild and MaxConnectionsPerChild differently.

MaxRequestsPerChild has been renamed to MaxConnectionsPerChild, describes more accurately what it does. The old name is still supported.

MaxClients has been renamed to MaxRequestWorkers, which describes more accurately what it does. For async MPMs, like event, the maximum number of clients is not equivalent than the number of worker threads. The old name is still supported.

see: http://httpd.apache.org/docs/2.4/mod/mpm_common.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.