是与Apache2“Worker MPM”(与“Prefork MPM”相对比)的Moodle(我正在使用Moodle 2.5.2)。 如果确实兼容的话,有没有人尝试过,哪一个能更好地performance出来,如果两者有什么不同呢? 谢谢!
我使用prefork和mod_perl在CentOS(主要是6.4)上运行apache 2.2.25。 最近有一个例子特别不合时宜,把孩子的孩子分出来: <snip> \_ /usr/sbin/httpd | \_ /usr/sbin/httpd | | \_ /usr/sbin/httpd | | \_ /usr/sbin/httpd | | \_ /usr/sbin/httpd | | | \_ /usr/sbin/httpd | | | \_ /usr/sbin/httpd | | | | \_ /usr/sbin/httpd | | | \_ /usr/sbin/httpd | | \_ /usr/sbin/httpd | \_ /usr/sbin/httpd | \_ /usr/sbin/httpd | | \_ […]
最近阿帕奇一直在产卵,尽pipe似乎没有理由。 重新启动〜10分钟后,它会让产卵工作人员继续工作,直到达到最大数量,并且从不提供新的请求。 服务重启( service apache2 restart )后,我开始监视访问日志。 只有两个相当简单的要求,才开始产卵像疯子这样的工人: #/var/log/apache2/access.log 66.249.64.215 – – [17/Feb/2016:00:30:18 +0000] "GET /wp-content/uploads/2015/08/colarinho_3.png HTTP/1.1" 304 179 "-" "Googlebot-Image/1.0" 201.80.103.196 – – [17/Feb/2016:00:33:00 +0000] "GET /wp-content/uploads/2015/09/circulo_cromatico.png HTTP/1.1" 200 40642 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0" 在完全停止提供新的请求之前,这是完整的状态。 $apache2ctl fullstatus Apache Server Status for localhost (via ::1) Server Version: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 […]
我有一个关于VPS服务器上的Apache MPM Preforkconfiguration的问题。 一个slicehost文章,他们build议将MaxClients设置为40,如果我的虚拟服务器上有256MB RAM的话。 ( http://articles.slicehost.com/2010/5/20/configuring-the-apache-mpm-on-debian ) 但是,由于每个客户端请求使用大约50MB RAM内存,交换是保证和我的VPS减慢。 PID RSS COMMAND 10146 45944 /usr/sbin/apache2 -k start 10147 52528 /usr/sbin/apache2 -k start 10150 49680 /usr/sbin/apache2 -k start 10151 48756 /usr/sbin/apache2 -k start 我发现,如果我将MaxClients设置为4(!),我不会进行任何交换,并且networking服务器应该更快(或者我错了吗?) 所以,我不明白他们为什么build议40。 谢谢
我正在运行一个服务于移动应用程序的API请求的Apache2 Ubuntu服务器。 最近我面临的一个瓶颈是,当请求越来越高(更多的并发用户),请求响应越来越慢。 以前需要1秒或2秒,但是一旦并发用户增加(在某个高峰时间),即使服务器负载, CPU和内存仍然很低,也可能会延迟10秒或更长时间。 我的目标是提高Apache2和Ubuntu Server在最低响应时间尽可能多的并发用户的能力。 内存和CPU不是主要的考虑因素,因为VPS规格如果达到极限,可以扩大规模。 我怎样才能做到这一点? 我到目前为止所做的: configurationulimit /etc/security/limits.conf并添加以下内容: 软nofile 40000 努力nofile 40000 软nproc 40000 将以下行添加到/etc/pam.d/common-session 会话需要pam_limits.so configurationApache2 /etc/apache2/mods-enabled/mpm_prefork.conf <IfModule mpm_prefork_module> StartServers 20 MinSpareServers 25 MaxSpareServers 100 MaxRequestWorkers 150 MaxConnectionsPerChild 0 MaxClients 8192 MaxRequestsPerChild 0 ServerLimit 8192 </ IfModule>configuration 将以下行添加到/etc/sysctl.conf fs.file-max = 2097152 响应时间似乎有所改善(虽然有些请求仍然延迟),但不令人满意,因为它仍然比非高峰时间慢得多。
针对1GB RAM的VPS的slicehost.com文章上build议的MPM preforkconfiguration为: <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> 我知道这取决于很多因素(究竟是哪一个?),但我想知道这些设置应该是256M和512M内存。 请给我提供configuration示例(如上表所示)。 我主要使用基于Drupal的VPS网站进行本地业务。 谢谢
我阅读了许多关于Apacheconfiguration的文章,并试图为我们的服务器find最好的价值。 为了确定什么是最好的,我使用JMeter来模拟每秒2100个连接。 经过多轮的微调,我得到了以下configuration: <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 10 ServerLimit 2048 MaxClients 2048 MaxRequestsPerChild 20000 </IfModule> 服务器详情: [root@web06 ~]# free total used free shared buffers cached Mem: 3814660 1070152 2744508 0 146788 766944 -/+ buffers/cache: 156420 3658240 Swap: 5210104 0 5210104 [root@web06 ~]# grep -c processor /proc/cpuinfo 4 [root@web06 ~]# uname –a Linux […]
不知道这是否更适合服务器故障或堆栈溢出,但在这里。 我在Apache MPM prefork上使用mod_php,并产生一个像这样的新进程: <?php exec("/usr/bin/php -f backgroundScript.php &"); ?> 假设新的backgroundScript.phpsubprocess运行了很长一段时间… 1)父PHP过程现在是否被认为是空闲的? 它是否返回到服务器池? 2)如果Apache杀死父PHP进程返回MinSpareServers ,那么backgroundScript.php也会被清理干净或继续无限期运行? 3)有没有其他的方式,Apache可能会无意中杀死backgroundScript.phpsubprocess? service httpd stop也许?
我目前正在使用在prefork内存模型上运行Apache的网站。 以下是httpd.conf的configuration <IfModule prefork.c> StartServers 30 MinSpareServers 15 MaxSpareServers 30 MaxClients 96 ServerLimit 512 MaxRequestsPerChild 0 </IfModule> 以下是从顶部的示例线 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 29261 apache 15 0 1003m 231m 53m S 16.3 2.9 1:47.68 httpd 以下是加载的Apache模块 core prefork http_core mod_so mod_auth_basic mod_authn_file mod_authz_host mod_authz_user mod_include mod_log_config mod_logio mod_env […]
对于我的应用程序,我不得不为这个configuration工作: <IfModule mpm_prefork_module> MaxRequestsPerChild 1 </IfModule> 我可以遇到这个configuration有什么问题。