2014-02-24 46 views
-1

我在Hyper-V Ubuntu系统上安装了Apache。目前,分配给vm机器的2GB RAM。我有大量PHP服务上传到Apache,通常在单个时间处理1000个并发请求。我需要帮助从apache2.conf文件设置Prefork配置,以便我的php web服务能够处理最大并发请求。配置apache2.conf来处理并发请求

默认apache2 Prefork设置如下。

<IfModule mpm_prefork_module> 
StartServers 4 
MaxClients 100 
MinSpareThreads 10 
MaxSpareThreads 50 
ThreadsPerChild 20 
MaxRequestsPerChild 0 
</ifModule> 

回答

0

我建议使用mpm_worker模块,这将允许您使用较少的内存来服务大量的并发请求。但您需要增加每个孩子的maxrequest,startservers,max客户端等。