php-fastcgi

FastCGI是什么?

FastCGI

PHP的FastCGI使你的所有php应用软件通过mod_fastci运行,而不是mod_phpsusexec.FastCGI应用速度很快 是因为他们持久稳定.不必对每一个请求都启动和初始化.这使得应用程序的开发成为可能,否则在CGI范例是不切实际的(例如一个大型的脚本,或者一个需要 连接单个或多个数据库的应用).

好处

  1. PHP脚本运行速度更快(3到30倍).PHP解释程序被载入内存而不用每次需要时从存储器读取,极大的提升了依靠脚本运行的站点的性能.
  2. 需要使用更少的系统资源.由于服务器不用每次需要时都载入PHP解释程序,你可以将站点的传输速度提升很高而不必增加cpu负担.
  3. 不需要对现有的代码作任何改变.现有的一切都适用于PHP的FastCGI

潜在问题

    • 对所有的子目录(/home/USERNAME/public_html/php.ini)你只有一个可用的php.ini文件. 这是优化网站代码所必需的.如果你需要多个php.ini文件以适应不同的脚本需要,你可以在任何子目录禁用PHP的快速CGI,而其余的地方则继续有 效.如果你需要这样做请联系support.
    • 你对PHP环境做的任何升级(如php.ini文件的改变)都有几分钟的延迟.这是因为为了更快的速度 你的php.ini文件已经被载入内存,而不是每次需要时再从存储器重新读取.

What is PHP-FPM?

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

These features include:

  • Adaptive process spawning (NEW!)
  • Basic statistics (ala Apache's mod_status) (NEW!)
  • Advanced process management with graceful stop/start
  • Ability to start workers with different uid/gid/chroot/environment and different php.ini (replaces safe_mode)
  • Stdout & stderr logging
  • Emergency restart in case of accidental opcode cache destruction
  • Accelerated upload support
  • Support for a "slowlog"
  • Enhancements to FastCGI, such as fastcgi_finish_request() - a special function to finish request & flush all data while continuing to do something time-consuming (video converting, stats processing, etc.)

... and much more.

It was not designed with virtual hosting in mind (large amounts of pools) however it can be adapted for any usage model.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值