通过调整 KeepAlive、MaxClients 和 AllowOverride 使 Apache 更快
Making Apache faster by adjusting KeepAlive, MaxClients and AllowOverride
我正在尝试配置 apache 以更快地做出反应。目前我遇到严重的滞后和巨大的响应时间。当我用谷歌搜索答案时,有文章提到 KeepAlive
、MaxClients
和 AllowOverride
,所以我想我现在的重点是它们。我只是好像没有找到它们。
这是 phpinfo();
输出:
apache2handler
**************
Apache Version Apache/2.4.12 (Win64) PHP/5.6.8
Apache API Version 20120211
Server Administrator admin@example.com
Hostname:Port
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 60 - Keep-Alive: 5
Virtual Server No
Server Root C:/Apache24
Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access_compat
mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file
mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi
mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_php5
mod_rewrite mod_setenvif
Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0
也许有人可以向我解释这个输出?我特别:
- "
Timeouts
" = "Connection: 60
" 设置
"Per Child
" = "0
" 设置
如果我理解正确:
- 允许60个连接
同时
- 每个连接最多有 100 个请求(为什么
这么多?)
- 服务器允许客户端加载所有资源
在一个请求中持续 5 秒
- 也许这些设置可以在 httpd.conf 而不是 php.ini 中找到? (现在我无法访问这些文件)
据我所知,超时与服务器等待连接的时间有关,默认为 60 秒。
Per Child 位与每个子进程的 运行 线程数有关。
我对这些东西有点含糊,但通读 docs,您应该找到您需要的所有解释!
我正在尝试配置 apache 以更快地做出反应。目前我遇到严重的滞后和巨大的响应时间。当我用谷歌搜索答案时,有文章提到 KeepAlive
、MaxClients
和 AllowOverride
,所以我想我现在的重点是它们。我只是好像没有找到它们。
这是 phpinfo();
输出:
apache2handler ************** Apache Version Apache/2.4.12 (Win64) PHP/5.6.8 Apache API Version 20120211 Server Administrator admin@example.com Hostname:Port Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100 Timeouts Connection: 60 - Keep-Alive: 5 Virtual Server No Server Root C:/Apache24 Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_php5 mod_rewrite mod_setenvif Directive Local Value Master Value engine 1 1 last_modified 0 0 xbithack 0 0
也许有人可以向我解释这个输出?我特别:
- "
Timeouts
" = "Connection: 60
" 设置 "
Per Child
" = "0
" 设置如果我理解正确:
- 允许60个连接 同时
- 每个连接最多有 100 个请求(为什么 这么多?)
- 服务器允许客户端加载所有资源 在一个请求中持续 5 秒
- 也许这些设置可以在 httpd.conf 而不是 php.ini 中找到? (现在我无法访问这些文件)
据我所知,超时与服务器等待连接的时间有关,默认为 60 秒。
Per Child 位与每个子进程的 运行 线程数有关。
我对这些东西有点含糊,但通读 docs,您应该找到您需要的所有解释!