我的确定fastcgi数量的方法

这里主要讨论php-fastcgi

1 将 nginx 各项参数加到足够大,php 加到足够多
2 根据日志、各进程执行时间等,找出一天内的访问最高峰(请求/秒)
3 req per second / avg process time=amount of PHP needed
将数值适当放大,留出余量

4 worker_processes 大概是和 CPU、CPU 核的数量相关的。参考 mysql 的并发线程参数
5 根据
worker_processess * (worker_connections-2)=PHP数量
的公式,反算出 worker_connections
6 同时要保证worker_rlimit_nofile 留余量,要比 worker_connections 大

This entry was posted in 默认分类 and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.