Comparison of IIS and Apache performance tests on Windows 7

Source: Internet
Author: User
Tags php script phpinfo

Environment (64-bit Win7): iis7+php5.4 (NTS non-thread-safe version) vs Apache2.4 (32-bit) +php5.4
static file Processing:
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
Conclusion: Apache based on Apr runtime and Winnt Multi-threading is no worse than IIS in static resource processing.




php file Processing:
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
Conclusion: Apache uses threaded MPM, so a thread-safe version of PHP is required, and thread safety checks have some overhead, so performance is lower than iis+php-cgi.




Info.htm is the HTML content of Phpinfo () output under IIS.
bs.php is a PHP script that performs 100 bubble sorts, with the following content:
<?php
Header (' Content-type:text/plain; Charset=utf-8 ');
function Bubble_sort ($array) {
$size = count ($array);
for ($i =0; $i < $size; $i + +) {
for ($j =0; $j < $size-1; $j + +) {
if ($array [$j] < $array [$j +1]) {
$temp = $array [$j];
$array [$j] = $array [$j +1];
$array [$j +1] = $temp;
}
}
}
return $array;
}
for ($c =0; $c <100; $c + +) {
$array = Array (0,1,2,3,4,5,6,7,8,9);
$array = Bubble_sort ($array);
}
Print_r ($array);
?>

During a iis7+php phpinfo () test, 100 concurrent, 10,000 requests, 8,978 requests failed!


attached: IIS and PHP installed on Windows 7
To install IIS:
Control Panel-Programs and features-turn Windows features on or off:
Internet Information Services-Web management Tools-IIS Admin Console tick
Internet Information Services-World Wide Web Services-common HTTP features-HTTP error tick
Internet Information Services-World Wide Web services-common HTTP features-static content tick
Internet Information Services-World Wide Web services-application development features-CGI tick


Click OK to wait for the installation to complete and restart the operating system.

Default Web site root directory:
C:\inetpub\wwwroot

Control Panel-Administrative Tools-internet Information Services (IIS) Manager: You can see the fastcgi settings.

PHP Manager 1.2 for IIS 7
http://phpmanager.codeplex.com/
Control Panel-Administrative Tools-internet Information Services (IIS) Manager: You can see "PHP Manager".

PHP NTS:
http://windows.php.net/
Control Panel-Administrative Tools-internet Information Services (IIS) Manager-"PHP manager"-"Register New PHP Version" fill in:
D:\png\php\5.4.39NTS\php-cgi.exe
Click "Check Phpinfo ()", select a site to check the PHP environment, check whether PHP installation is successful.
If you have more than one PHP version registered, you can click "Change PHP Versions" to switch.

Comparison of IIS and Apache performance tests on Windows 7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.