apache的Prefork vs worker模块,使用了什么?

apache的Prefork vs worker模块,使用了什么?,apache,worker,preforking,Apache,Worker,Preforking,如果无法确定我的apache使用的是哪种MPM,有人能根据以下输出判断出来吗? 我猜是Prefork被使用了 [root@rp1a~]#cat/etc/sysconfig/httpd #HTTPD=/usr/sbin/httpd.worker #OPTIONS= #HTTPD_LANG=C ulimit -n 65000 OPTIONS="-D SetCacheHeaders -D Gzip -D front" [root@rp1a~]#tail/etc/httpd/conf.d/rp-b

如果无法确定我的apache使用的是哪种MPM,有人能根据以下输出判断出来吗?
我猜是Prefork被使用了

[root@rp1a~]#cat/etc/sysconfig/httpd

#HTTPD=/usr/sbin/httpd.worker

#OPTIONS=

#HTTPD_LANG=C
ulimit -n 65000
OPTIONS="-D SetCacheHeaders -D Gzip -D front"
[root@rp1a~]#tail/etc/httpd/conf.d/rp-base.conf

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>
[root@rp1a~]#/usr/sbin/httpd-V

Server version: Apache/2.2.3
Server built:   Jun 13 2013 10:45:37
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@rp1a~]#apachectl-l

Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c
[root@rp1a~]#httpd-l

[root@rp1a~]#httpd.worker-l

Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c
[root@rp1a~]#ps-C httpd.worker-F

UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
[root@rp1a~]#ps-C httpd-F |封头

UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      3947     1  0 63439 12092   0 Jul29 ?        00:00:12 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16411  3947  0 64231  8632   1 13:28 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16501  3947  0 64231  9372   1 13:32 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16662  3947  0 64149  8452   1 13:40 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16807  3947  0 64199  8688   1 13:50 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16814  3947  0 64147  8452   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16836  3947  0 64199  8612   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16876  3947  0 64231  9204   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16935  3947  0 64139  8452   1 13:54 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front

服务器MPM:预工作


所以,是的,似乎使用了prefork。但是为了确保您看到的是正确的二进制文件,请尝试/usr/sbin/httpd-V。

服务器MPM:Prefork


所以,是的,似乎使用了prefork。但是为了确保您看到的是正确的二进制文件,请尝试/usr/sbin/httpd-V。

使用
/usr/sbin/httpd-V
输出更新的问题,看起来像是预工作soYes,它使用的是预工作MPM。使用
/usr/sbin/httpd-V
输出更新的问题,看起来像是预工作soYes,它使用的是预工作MPM。
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      3947     1  0 63439 12092   0 Jul29 ?        00:00:12 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16411  3947  0 64231  8632   1 13:28 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16501  3947  0 64231  9372   1 13:32 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16662  3947  0 64149  8452   1 13:40 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16807  3947  0 64199  8688   1 13:50 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16814  3947  0 64147  8452   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16836  3947  0 64199  8612   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16876  3947  0 64231  9204   1 13:51 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front
apache   16935  3947  0 64139  8452   1 13:54 ?        00:00:01 /usr/sbin/httpd -D SetCacheHeaders -D Gzip -D front