Windows Server下IIS+PHP+FastCGI的简单优化

前两天因为一台linux的机器硬盘挂掉了,所以临时找了台Server 2003先顶了一下…

因为FastCGI的性能提高不少,所以也尝试了一下让IIS用FastCGI的方式执行PHP.简单做了一点优化,效果还是比较满意的.

所有操作在IIS6下测试,未测试IIS7.

用文本编辑器打开C:\WINDOWS\system32\inetsrv\fcgiext.ini,找到[PHP]部分.主要的属性有以下几个:

MaxInstances=10
MaxInstances定义了IIS可以发起的最大cgi进程数,默认值为10,该数值对大多数需要用到独立服务器的网站来说是不够的.具体修改的数值,建议根据系统资源决定,一般情况下,正常工作状态的php-cgi进程需要占用20M内存.

QueueLength=n
一个cgi进程最大处理队列值,默认1000

IdleTimeout=n
php-cgi进程的允许空闲时间,默认300s,超过该时间cgi进程退出

InstanceMaxRequests=n
每个cgi进程允许处理的请求次数,达到该数值cgi进程将重启.

Tags: , , ,

Sunday, June 14th, 2009 Server

11 Comments to Windows Server下IIS+PHP+FastCGI的简单优化

  1. 瓦咔咔,主题不错嘛。。

  2. emptyhua on August 19th, 2009
  3. World Cup more exciting, and remember that sustained attention!

  4. folding table on June 28th, 2010
  5. Very informative blog, I hope again that the community can better content.

  6. emc filter on June 29th, 2010
  7. Highlights of the World Cup beginning to show, cheer for the team like it.

  8. cage aquaculture on June 29th, 2010
  9. I am not passing, I came to learn.

  10. laser cutting machine on June 29th, 2010
  11. Very wonderful blog, I hope to continue to add new content.

  12. cnc router on June 30th, 2010
  13. This blog is definitely the highlight of the Internet, you think?

  14. laser marking machine on June 30th, 2010
  15. Soon after work, and use this time to learn about.

  16. dot peen marking machine on July 1st, 2010
  17. Very professional site, good.

  18. plug valve on July 1st, 2010
  19. The new week began, let us into the new work which it.

  20. power line filter on July 5th, 2010
  21. By bloggers to learn a little knowledge, bloggers can stick to update.

  22. laser engraving machine on July 5th, 2010

Leave a comment