Heim  >  Artikel  >  Backend-Entwicklung  >  apache - windows下运行php的web server,怎么搭配性能比较优

apache - windows下运行php的web server,怎么搭配性能比较优

WBOY
WBOYOriginal
2016-06-06 20:31:551620Durchsuche

受限只能在windows用php,nginx就不考虑了,太弱;swoole也没win版本

我的设想是iis7.5,op缓存有wincache,好在redis/memcache都有win版可用

另外一个是apache+mod_fpm/mod_fastcgi,win下按理应该是fcgi方式快一些吧

顺便问一下,如果是纯html,用哪个web server最佳?如果以上性能不够,可能会生成纯html的方式

回复内容:

受限只能在windows用php,nginx就不考虑了,太弱;swoole也没win版本

我的设想是iis7.5,op缓存有wincache,好在redis/memcache都有win版可用

另外一个是apache+mod_fpm/mod_fastcgi,win下按理应该是fcgi方式快一些吧

顺便问一下,如果是纯html,用哪个web server最佳?如果以上性能不够,可能会生成纯html的方式

kangle也不错哦。

PHP官方的ZendOpcache同样支持Windows,不需要使用wincache这个东西.
Redis和Memcached的Windows版本是第三方提供的,不是Redis/Memcached官方支持的.
Swoole在Cygwin环境下也可以运行于Windows.

Windows 7 上 IIS 和 Apache 性能测试对比
环境(64位Win7): IIS7+PHP5.4(NTS非线程安全版本) vs Apache2.4(32位)+PHP5.4
静态文件处理:
ab -k -c100 -n10000 http://127.0.0.1/info.htm # IIS RPS 1709
ab -k -c100 -n10000 http://127.0.0.1:8080/info.htm # Apache RPS 1847
结论:基于APR运行时和WinNT多线程的Apache在静态资源处理方面并不比IIS差.
apache - windows下运行php的web server,怎么搭配性能比较优

apache - windows下运行php的web server,怎么搭配性能比较优
PHP文件处理:
ab -k -c100 -n10000 http://127.0.0.1/bs.php # IIS RPS 1180
ab -k -c100 -n10000 http://127.0.0.1:8080/bs.php # Apache RPS 1071
结论:Apache使用了线程化的MPM,所以需要使用线程安全版本的PHP,而线程安全检查有一定开销,所以性能要比IIS+PHP-CGI低一些.
apache - windows下运行php的web server,怎么搭配性能比较优

apache - windows下运行php的web server,怎么搭配性能比较优

在一次IIS7+PHP的phpinfo()测试中,100并发,10000个请求,居然有8978个请求失败了!
apache - windows下运行php的web server,怎么搭配性能比较优

然而,访问量多大呢?什么类型的网站呢?

我想知道 nginx 怎么就太弱了。。。

坑太多。我们公司用了几年的win。IIS. php.
这个月决定转移到liunx了。主要是一个网站在IIS上不停报错。客户已经吧电话打爆了。最后迁移到Liunx。问题解决。老板决定以后再也不用win服务器了。早点出坑吧。到时候出l了问题。哭都来不及。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn