A Benchmark Method for PHP Hosting Server Speed

Dec 20, 2007 19:24 GMT  ·  By

There are situations when you need to test PHP scripts online in order to analyze various influencing parameters. If you do not want to pay for a commercial web hosting service, free alternatives will be always available. But free web hosting services usually have limitations and it is recommended to always check the features provided in order to determine if the minimum requirements for running a given PHP application are met.

A simple search on any popular search engine of a free PHP web hosting service will not offer you a relevant image of a possible reliable choice. Web hosting services directories contain resources to the existing Internet services providers having free or commercial services. Regarding PHP free web hosting services resources, Free-Webhosts.com offers information concerning main features and limitations of various hosting services.

In the particular case of PHP free web hosting providers, with the help of a script, Free-Webhosts.com website presents a hierarchy based on script execution test results. The Free PHP Benchmark Performance Script is offered for free under the GPL license and allows the determination of benchmark speed reported to time needed for execution of some simple mathematical operations.

The script has configurable parameters and returns the average time needed to solve 20 000 (default) cycles of mathematical operations, time calculated as a function of the number of iterations. Between iterations a certain value of the delay time can be defined, with the help of a Javascript redirection. The extreme values for script execution are eliminated from the average time calculation. You can customize the script to compare the results obtained for various PHP web hosting services.

I consider that the script must run using a different number of functions execution cycles at the same number of iteration value and then, by maintaining the number of script execution cycles constant, various iterations numbers should be tested. Also, the value of redirection delay should be changed in order to evaluate the degree of variation of the script execution time. By performing tests with different parameters values you will minimize the statistical errors in determination of the average execution time for the given PHP script.