Apache 与 IIS PHP 性能比较
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1197953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache vs. IIS PHP performance comparison
提问by misteraidan
Does anyone know of any links to realistic performance comparisons of IIS vs. Apache for PHP hosting?
有谁知道 IIS 与 Apache 用于 PHP 托管的实际性能比较的任何链接?
I am looking to utilise existing infrastructure for a change of technologies from .NET to a PHP application but I cannot find any information about PHP hosted on varying platforms. There is heaps out there about IIS vs. Apache in general, or ASP.NET vs PHP .. or any other language server vs server, language vs language but no server/language vs server/language.
我希望利用现有基础设施将技术从 .NET 更改为 PHP 应用程序,但我找不到有关在不同平台上托管的 PHP 的任何信息。关于 IIS 与 Apache,或 ASP.NET 与 PHP .. 或任何其他语言服务器与服务器、语言与语言,但没有服务器/语言与服务器/语言,有很多关于 IIS 与 Apache 的问题。
My current direction is to use PHP with FastCGI.. looks pretty good. Just need to justify it or find a compellingreason to reject the big cuddly MS monster that I'm used to.
我目前的方向是在 FastCGI 中使用 PHP .. 看起来不错。只需要证明它是合理的,或者找到一个令人信服的理由来拒绝我习惯的那个大而可爱的 MS 怪物。
UPDATED
更新
Windows environment would be Win2k3 running IIS6 with FastCGI serving the PHP extension. Also planning to use eAccelerator or similar script cache.
Windows 环境将是运行 IIS6 的 Win2k3,FastCGI 为 PHP 扩展提供服务。还计划使用 eAccelerator 或类似的脚本缓存。
回答by nik
PHP Best Practices article -- Differences between PHP on WIMP and PHP on LAMP
PHP 最佳实践文章——WIMP 上的 PHP 和 LAMP 上的 PHP 之间的差异
Some of the differences you may encounter when developing with PHP on Win/IIS vs Linux / Apache.
The most obvious difference between WIMP and LAMP is definitely performance.
For years there has been an obvious performance advantage of LAMP over WIMP.
Only recently is their even a chance of closing that gap.
There are currently 2 projects underway that may help.Currently available is IIS7 which is reported to have had PHP performance enhancements built in with collaboration from the ZEND team.
An upcoming projects involves Microsoft engineers working with PHP engineers to get the next version of PHP (PHP5.3 which is not yet available at this time) to perform much better in IIS. This will no doubt make some progress toward WIMP catching up with LAMP in performance.
在 Win/IIS 与 Linux/Apache 上使用 PHP 进行开发时可能会遇到一些差异。
WIMP 和 LAMP 之间最明显的区别肯定是性能。
多年来,LAMP 与 WIMP 相比具有明显的性能优势。
直到最近,他们才有机会缩小这一差距。
目前有 2 个项目正在进行中,可能会有所帮助。目前可用的是 IIS7,据报道它在 ZEND 团队的协作下内置了 PHP 性能增强功能。
一个即将到来的项目涉及 Microsoft 工程师与 PHP 工程师合作,以获得 PHP 的下一个版本(目前尚不可用的 PHP5.3)以在 IIS 中表现得更好。这无疑将使 WIMP 在性能上赶上 LAMP 取得一些进展。
回答by CMircea
FastCGI on IIS will significantly increase the performance and will be comparable to that of LAMP. The difference will be in details, which are hard to pick and depends on what your configuration is and on what you scripts do. For example, file access on Windows is much slow than on Linux because of NTFS's ACL checks.
IIS 上的 FastCGI 将显着提高性能,将与 LAMP 相媲美。区别在于细节,这很难选择,取决于您的配置是什么以及您的脚本做什么。例如,由于 NTFS 的 ACL 检查,Windows 上的文件访问比 Linux 慢得多。
There is nothing particularly wrong with the Windows web stack. The only big reason I'd think of using Windows over Linux when human experience doesn't matter would be SQL Server. Otherwise WAMP, WIMP and LAMP perform comparably and performance differences won't show up until heavy load.
Windows 网络堆栈没有什么特别的错误。当人类经验无关紧要时,我认为在 Linux 上使用 Windows 的唯一重要原因是 SQL Server。否则 WAMP、WIMP 和 LAMP 的性能相当,直到重载时性能差异才会显现出来。

