Large traffic site do not choose the universal space

Source: Internet
Author: User
Tags iis php and linux
Many of the domestic virtual host, support PHP space currently more than 90% are using the Windows host. There are also many Windows hosts that support universal space, while supporting asp,php,asp.net and so on.

PHP space to use IIS will be slow, you should use Apache as a server program, preferably the Linux system, because the Windows system +apache although fast, but may not support the PHP mail () function, IIS must not support. htaccess.

The following test environments are in the context of Windows XP system sp3/ie 6.0/3g cpu/1g memory, only loop and text output tests, and other functions are not tested. The test results of windows+iis+php and windows+apache+php were as follows:

    1. Procedure: <?for ($i =1; $i <=100000000; $i + +) {}?>
      Cycle 100 million times, iis+php and apache+php are all 14 seconds complete.
    2. Procedure: <?for ($i =1; $i <=1000; $i + +) echo "Peace";? >
      Loop 1000 times, using GB2312/ANSI encoding format, the output of the page volume for 5k,iis+php and apache+php are less than 1 seconds to complete, iis+php will be slower.
    3. Procedure: <?for ($i =1; $i <=100000; $i + +) echo "Peace";? >
      Loop 100,000 times, the output of the page volume for 500k,iis+php 30 seconds to complete, apache+php only used less than 1 seconds.
    4. Procedure: <?for ($i =1; $i <=1000000; $i + +) echo "Peace";? >
      Cycle 1 million times, the output of the Web page volume of 5 trillion, iis+php run 31 seconds to complete, apache+php use 1 seconds to complete.
    5. Procedure: <?for ($i =1; $i <=100000000; $i + +) echo "Peace";? >
      Cycle 100 million times, iis+php run 31 seconds to complete, apache+php run to 50 seconds when the browser crashed, unable to complete.

From the above test can be seen, the loop in the background server speed is the same, output text to the browser time is different. In the PHP program, Apache prints text from the server very quickly, and the IIS output text is slow. Web page Teaching Network program, has used iis+php, only a few k of the page a cycle of 100 of the program, IIS text output speed is very slow. Using apache+php, the local test is processed at lightning speed.

If your site's blog program, forum program using PHP, if there is a slower situation, you may wish to check whether the use of IIS as a background. If you have used IIS as the server background for PHP, do not use IIS again. Universal space is now prevalent because of demand. If it is a small flow of corporate web sites, the temporary use of all-round space is no harm. Large traffic site, should choose Apache or Ngnix server background, the best choice of Linux system.



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.