我一直在运行有500个打开连接的多卷曲爬虫。为了获得最佳性能,您对apache/php设置有什么建议吗?
这是我的设置:
<IfModule mpm_prefork_module>
StartServers 50
MinSpareServers 50
MaxSpareServers 100
MaxClients 1500
MaxRequestsPerChild 0
</IfModule>发布于 2014-02-07 02:12:19
使用少量进程启动crawler,然后运行此脚本
ps -C httpd,apache2,apache -o rss --no-header | awk '{a=a+$1; b=b+1} END {print a" "a/b" "b}'它将向您显示每个apache进程的平均内存使用情况。然后,你可以根据你的ram来计算你的结构有多少进程。
https://stackoverflow.com/questions/21610543
复制相似问题