PHP FastCGI 进程管理器: PHP-FPM

最近 PHP-FPM (PHP FastCGI Process Manager) 这个话题在讨论组里很受关注。使用 PHP 的朋友对于 FastCGI 进程的管理估计都很头疼,比如 Nginx 下的 FastCGI 就有不少人用的 Lighttpd 的 spawn-fcgi 来对进程进行管理。但这样存在不少缺点(中文版本)。

PHP-FPM 配置起来很简单,但有一点比较有意思的是如何确定 Worker 的数量。PHP-FPM 作者 Andrei Nigmatulin 在新闻组里提到的小技巧如下:

1) 用 Linux top 命令观察 (这个方式比较土)
2) 用 'netstat -np | grep 127.0.0.1:9000' 收集数据。
设置 php-fpm.conf 中的 max_children 的数值使 等待的数量变为最小。

目前使用 PHP-FPM 还只是通过 Patch 方式,然后编译,期待能够早点并入正式的 PHP 代码中。当然,PHP 核心开发的那些大爷们也不知都在忙什么呢,莫非还在为 Unicode 较劲呢?

--EOF--

Tips : PHP-FPM on highload tips

| | TrackBacks (0) | | Edit

Generator | Trampoline | 外贸英才网 | Vinyl fence
Vertical Packaging Machine | Digital Blood Pressure Monitor

自定义搜索

本文相关评论|Comments(11)

black-xstar.com Author Profile Page 的评论:

看不懂,纯粹抢沙发的,嘿嘿。

Leechael 的评论:

This is temporary restriction to let php-fpm become mature in his cradle
before it hit the streets.
I'd like to see all main features implemented first. Then the licence most
probably will be changed to php-compatible one in order to be accepted by php
developers.
BTW, current licence does not restrict you from use of the product, only from
distribution in particular cases.


这是作者的原话。

blankyao 的评论:

刚换成Nginx,现在感到不爽的是资料太少啦

Zhuang@FUN 的评论:

改行了,,已不再关注

Noble 的评论:

估计还是稳定性的问题吧
好像开源的产品,开始的时候功能加的都很快,而后就越来越慢的,稳定性就排到第一位了
不过,只要不是每次重写的就好
稳定第一

nightsailer 的评论:

PHP 5.2的fastcgi一直有bug,只能用php-fpm来修订.
我很早就用这个了,效果还是非常好的.

bixuan 的评论:

这个确实很强悍,我们也用了好久,没出过什么异常!

decoration 的评论:

谢谢!学习一下

yihua2000 的评论:

php+mysql+GD
没有问题
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-j
peg-dir=/usr/local --with-zlib-dir=/usr/local --with-freetype-dir=/usr/local --with-png-dir=/usr/local --with-gd=/usr/local/GD --with-libxml-dir=/usr/local --enable-mbstring --enable-xml --enable-sockets --enable-ipv6 --enable-fastcgi --enable-fpm
但是加入fpm后编译出fpm_php.c: In function `zend_ini_alter_master':
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:27: error: `tsrm_ls' undeclared (first use in this function)
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:27: error: (Each undeclared identifier is reported only once
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:27: error: for each function it appears in.)
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:27: warning: dereferencing type-punned pointer will break strict-aliasing rules
/php-5.2.6/sapi/cgi/fpm/fpm_php.c: In function `fpm_php_apply_defines':
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:87: error: too few arguments to function `php_dl'
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:99: error: `tsrm_ls' undeclared (first use in this function)
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:101: warning: passing arg 2 of `fpm_php_disable' from incompatible pointer type
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:108: warning: passing arg 2 of `fpm_php_disable' from incompatible pointer type
/php-5.2.6/sapi/cgi/fpm/fpm_php.c: In function `fpm_php_cleanup':
/php-5.2.6/sapi/cgi/fpm/fpm_php.c:126: error: `tsrm_ls' undeclared (first use in this function)
make: *** [sapi/cgi/fpm/fpm_php.lo] 错误 1

在线代理 的评论:

好文。
但是下面这句链接视乎有问题,中文的链接不对。
-----------------------------
但这样存在不少缺点(中文版本)。
-----------------------------

hshh 的评论:

php没整合这个patch是因为它使用了GPL授权.

添加评论

关于这篇文章

这篇文章由 Fenng 于 May 22, 2008 9:57 PM 发布

上一篇:侠客行恭候网络侠客

下一篇:侠客行会议归来

回到首页查看最近的文章或者是查看所有归档文章

DBA notes 的订阅数量,点击则可进行订阅
Feed 订阅数量,点击即可订阅最新内容