我希望得到一些关于Apache的最佳设置的专家build议。
目前我们的网站运作如下。
有些网页可能会有30个该用户的请求。
正在使用的服务器是
目前的Apache设置
KeepAlive on MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule> <IfModule worker.c> StartServers 4 MaxClients 300 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule>
我认为keepalive应该是,但超时应设置为1秒。 任何想法将不胜感激。
#
httpd -V Server version: Apache/2.2.15 (Unix) Server built: Feb 7 2012 09:50:11 Server's Module Magic Number: 20051115:24 Server loaded: APR 1.3.9, APR-Util 1.3.9 Compiled using: APR 1.3.9, APR-Util 1.3.9 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"
testing,testing,testing和testing。
抓取一些体面的负载发电机(不, ab 不适合)像围困,jperf,洪水或tsung,build立一个基线,然后开始加载与请求和繁忙的不同组合。
同样显而易见的是,你不知道如何configurationapache,因为在任何时候只使用一个MPM; 2.4之前,这实际上是编译的,安装后无法更改。
首先,弄清楚当前的configuration是什么 ; 用httpd -V的结果更新你的post,我们可以提供进一步的帮助。