Les scripts de benchmark utilisés:
-PHP Benchmark Performance Script
<?php
/*
##########################################################################
# PHP Benchmark Performance Script #
# ø 2010 Code24 BV #
# #
# Author : Alessandro Torrisi #
# Company : Code24 BV, The Netherlands #
# Date : July 31, 2010 #
# version : 1.0 #
# License : Creative Commons CC-BY license #
# Website : http://www.php-benchmark-script.com #
# #
##########################################################################
*/
function test_Math($count = 140000) {
$time_start = microtime(true);
$mathFunctions = array("abs", "acos", "asin", "atan", "bindec", "floor", "exp", "sin", "tan", "pi", "is_finite", "is_nan", "sqrt");
foreach ($mathFunctions as $key => $function) {
if (!function_exists($function)) unset($mathFunctions[$key]);
}
for ($i=0; $i < $count; $i++) {
foreach ($mathFunctions as $function) {
$r = call_user_func_array($function, array($i));
}
}
return number_format(microtime(true) - $time_start, 3);
}
function test_StringManipulation($count = 130000) {
$time_start = microtime(true);
$stringFunctions = array("addslashes", "chunk_split", "metaphone", "strip_tags", "md5", "sha1", "strtoupper", "strtolower", "strrev", "strlen", "soundex", "ord");
foreach ($stringFunctions as $key => $function) {
if (!function_exists($function)) unset($stringFunctions[$key]);
}
$string = "the quick brown fox jumps over the lazy dog";
for ($i=0; $i < $count; $i++) {
foreach ($stringFunctions as $function) {
$r = call_user_func_array($function, array($string));
}
}
return number_format(microtime(true) - $time_start, 3);
}
function test_Loops($count = 19000000) {
$time_start = microtime(true);
for($i = 0; $i < $count; ++$i);
$i = 0; while($i < $count) ++$i;
return number_format(microtime(true) - $time_start, 3);
}
function test_IfElse($count = 9000000) {
$time_start = microtime(true);
for ($i=0; $i < $count; $i++) {
if ($i == -1) {
} elseif ($i == -2) {
} else if ($i == -3) {
}
}
return number_format(microtime(true) - $time_start, 3);
}
$total = 0;
$functions = get_defined_functions();
$line = str_pad("-",38,"-");
echo "<pre>$line\n|".str_pad("PHP BENCHMARK SCRIPT",36," ",STR_PAD_BOTH)."|\n$line\nStart : ".date("Y-m-d H:i:s")."\nServer : {$_SERVER['SERVER_NAME']}@{$_SERVER['SERVER_ADDR']}\nPHP version : ".PHP_VERSION."\nPlatform : ".PHP_OS. "\n$line\n";
foreach ($functions['user'] as $user) {
if (preg_match('/^test_/', $user)) {
$total += $result = $user();
echo str_pad($user, 25) . " : " . $result ." sec.\n";
}
}
echo str_pad("-", 38, "-") . "\n" . str_pad("Total time:", 25) . " : " . $total ." sec.</pre>";
?>
-PHP SERVER - GENERAL PHP PERFORMANCE COMPARISON SCRIPT
<?php
/* ----------------------------------------------------------------
* PHP SERVER - GENERAL PHP PERFORMANCE COMPARISON SCRIPT
* ----------------------------------------------------------------
* COPYRIGHT BY ANDREAS MEHRRATH
* MINDCATCH SOFTWARE SOLUTIONS (c)
* FILENAME: php_perfmon.php
* LC: 2013-07-16, V. 1.1
* ----------------------------------------------------------------
*
* PHP SERVER PERFORMANCE MEASURING.
* STRING, ARRAY, OUTPUT (BUFFERED) AND MATH OPERATION BASED MEASURING.
* ONLY INTERNAL PERFORMANCE IS EVALUATED, DOES NOT MEASURE DISK OR
* NETWORK PERFORMANCE, RETURNS ONLY SERVER LOAD DEPENDENT SAMPLES,
* SO PLEASE AVERAGE YOUR SERVERS RUNTIME(S) FOR COMPARISION.
*
* USAGE:
*
* STANDARD ITERATION OF ALL OPERATIONS IS 10.000 (TEN THOUSAND).
* YOU CAN START THE SCRIPT WITH A CUSTOM, LOWER ITERATION AMOUNT IF NECESSARY.
*
* FOR EXAMPLE IF YOUR PHP EXECUTION TIME LIMIT IS TO LOW AND YOUR SERVER
* IS NOT ABLE TO PROCESS THIS PERFORMANCE METERING SCRIPT IN THAT TIME. (OLD SERVERS)
* IN THAT CASE WHEN THE SCRIPT RETURNS NOTHING, CURRUPT DATA, ONLY A NUMBER, OR AN ERROR
* YOU MUST REDUCE THE ITERATIONS.
*
* e.g. RUN: .../php_perfmon.php?iterations=5000
*
* WHEN MANUALLY REDUCING THE ITERATIONS THE SCRIPT -AUTOMATICALLY- DETECTS THAT
* AND EXTRAPOLATES YOUR RUNTIME TO GIVE YOU A COMPARABLE RESULT!
*
* IMPORTANT: DECREASE ITERATIONS AS LITTLE AS POSSIBLE!
*
* PLEASE FEEL FREE TO SEND SERVER(s) PERFORMANCE RESULTS EVALUATED TO:
*
* php_perfmon@mindcatch.com
*
* I WILL ADD THEM TO THE PUBLIC COMPARISON DATA FILE FOR THE COMMUNITY. THANKS!
*
* NO WARRANTY FOR ANYTHING. ALL UNDER GNU-LGPL LICENSE. THE DATA PROVIDERS
* ARE RESPONSIBLE FOR DATA PROVIDED IN NO WAY THE DEVELOPER OF THIS SCRIPT.
*
* ----------------------------------------------------------------
*/
error_reporting(E_ALL);
ini_set('display_errors',1);
// -----------------------------------------------------------------------------
// DO NOT CHANGE ANY PHP CODE/VARS OR YOUR RESULTS WILL NOT BE COMPARABLE ANY MORE
// -----------------------------------------------------------------------------
$scriptVer = "1.1";
$timeNeeded = 0.0;
$oriIt = 10000; // ORIGINAL ITERATIONS: 10000 (DONT CHANGE)
// WORK ALSO WITH REDUCED ITERATIONS TO PASS LIMITS
if (!array_key_exists("iterations",$_GET)) $iterations = $oriIt;
else $iterations = $_GET['iterations'];
$magic = 6938392;
$buffer1 = array();
$buffer2 = array();
$result = "";
$sum = 0;
$factor = 1.0;
$extrapol = false;
$dataFile = "php_perfmon.data";
// -----------------------------------------------------------------------------
// ***********************
function microtime_float()
// ***********************
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
// ***********************
function makeHash(&$value)
// ***********************
{
$value = md5($value);
}
// ***********************
function callback($buffer)
// ***********************
{
// SOME ARRAY DUMMY OPS
$someArray = array_merge(explode(" ",$buffer),explode(" ",$buffer)); // dummyOps
sort($someArray);
array_reverse($someArray,true);
sort($someArray);
array_search(9191,$someArray); // true
array_walk($someArray,"makeHash"); // make hashes
array_flip($someArray); // operate but not overwrite because it would shrink
array_search(9191,$someArray); // false
sort($someArray);
$boolTrue = is_bool(is_array(count($someArray)));
$boolTrue = true;
// if ((!$boolTrue)&&(substr($buffer,0,2)==" 0")) { echo "ok"; die(); }
$retVal = str_replace(array("xxxx","yyyy"), array("0000","4444"), $buffer);
$retVal = str_replace(array("aaaa","bbbb"), array("1111","2222"), $retVal);
$retVal = str_replace(" ","",$retVal);
if ((is_numeric($retVal))&&($boolTrue)) return $retVal; // use dummyVar - Zend Optimizer aware
return $GLOBALS['magic'];
}
// -----------------------------------------------------------------------------
$timeStart = microtime_float();
for ($i=0;$i<$iterations;$i++)
{
ob_start();
?> 1111 xxxx yyyy 2222 xxxx yyyy 3333 1111 xxxx yyyy 2222 xxxx yyyy 3333 9191 xxxx yyyy 2222 xxxx yyyy 3333 1111 xxxx yyyy 2222 xxxx yyyy 3333 <?php // position of php tag important
$buffer1[$i] = ob_get_clean();
// ob_end_flush();
ob_start();
?> 0000 aaaa bbbb 4444 aaaa bbbb 5555 0000 aaaa bbbb 4444 aaaa bbbb 5555 9191 aaaa bbbb 4444 aaaa bbbb 5555 0000 aaaa bbbb 4444 aaaa bbbb 5555 <?php // position of php tag important
$buffer2[$i] = ob_get_clean();
// ob_end_flush();
}
for ($i=0;$i<$iterations;$i++)
{
ob_start("callback");
echo $buffer1[$i];
$result = callback(ob_get_contents());
$output = ob_get_clean();
ob_start("callback");
echo $buffer2[$i];
$result .= callback(ob_get_contents());
$output .= ob_get_clean();
if (is_numeric($result))
$result = (sqrt(sqrt(sqrt(sqrt(sqrt(sqrt(($result-(1024*1024)))/1024/1024/1024)/1024/1024/1024)*
mt_rand(rand(101,202),303)/1024/1024/1024)/1024/1024/1024)/1024/1024)*$magic);
else
$result = $magic+1;
$output = callback($output);
if (is_numeric($output))
$output = (sqrt(sqrt(sqrt(sqrt(sqrt(sqrt(($output-(1024*1024)))/1024/1024/1024)/1024/1024/1024)*
mt_rand(rand(101,202),303)/1024/1024/1024)/1024/1024/1024)/1024/1024)*$magic);
else
$output = $magic;
$sum += round(log(log((float)(($result-$output)*$magic))),4)."\n\n";
// SOME UNSET WORK - ALSO IMPORTANT TO PRINT ONLY DESIRED USER DEFINED VARIABLES AT END
unset($result);
unset($output);
}
unset($i);
unset($buffer1);
unset($buffer2);
$timeEnd = microtime_float();
// ------------------------------- end of measuring ----------------------------------------------
$timeNeeded = $timeEnd - $timeStart;
unset($timeStart);
unset($timeEnd);
// EXTRAPOLATE
if ($iterations<$oriIt)
{
$factor = $oriIt/$iterations;
$timeNeeded = $timeNeeded*$factor;
$extrapol = true;
}
// -----------------------------------------------------------------------------
// OUTPUT
// -----------------------------------------------------------------------------
?>
<html><body>
<style>
body, td { font: 11px verdana; }
table { background-color: #F2EAC4; border: 1px solid black; margin-top: 2px; }
h1 { font: 16px verdana; color: maroon; }
th { font-weight: bold; color: #267C73; background-color: #C9F5E6; }
.runtime { background-color: #F1D0C9 ! important; text-align: right; font-weight: bold; }
</style>
<h1>PHP Server - General Performance Comparison Script</h1>
<font size=1>Random Result: <?php echo $sum." | Alloc. PHP-RAM:".round((memory_get_usage()/1024),2)."MB (Peak:".
round((memory_get_peak_usage()/1024),2).") | Time: ".date("H:i:s")." | Iterations: ".$iterations."/".$oriIt." (Factor: 1:".$factor;
if ($extrapol) echo ", runtime was extrapolated";
?>)<br></font>
<table border="2" width="840">
<tr><th>PHP/Script<br><font size="1">Versions & Date</font></th><th>Server Info</th><th><font size="1">Average</font><br>Runtime <font size="1">(sec)<br>Less=Better</font></th></tr>
<tr style="background-color: yellow;"><td>PHP <?php echo phpversion().", ".$scriptVer.", ".date("Y-m-d"); ?></td>
<td><b>This Server (<?php
if (array_key_exists("SERVER_NAME", $_SERVER)) echo $_SERVER["SERVER_NAME"].", ".$_SERVER["SERVER_ADDR"];
else echo "unknown";
echo ", ".PHP_OS;
?>)</b></td>
<td class="runtime"><?php echo round($timeNeeded,4); ?></td></tr>
<tr><td colspan="3"> </td></tr>
<?php
// LIST OF MEASURED SERVERS
if (file_exists($dataFile)) echo file_get_contents($dataFile);
else echo "<tr><td colspan=3>Data file (".$dataFile.") missing, no comparison table loadable!</td></tr>";
?>
</table>
<br>
<font size=1>Script Version: <?php echo $scriptVer; ?> - Original by Andreas Mehrrath © mindCatch(tm) Software Solutions 2013,
PHP Max Execution Time Parameter on this machine is set to: <?php echo ini_get('max_execution_time'); ?>s
<br>
<br>
<div style="width: 840px; background-color: #F2EAC4;">
<b>i.</b> Please note: A big gap between measured runtime and the time the page is
displayed in your browser mainly depends on network/security infrastructure performance between your
client and the executing server evaluated. <b>Please send results to: php_perfmon@mindcatch.com, thanks.</b>
</div>
<br>
<br>
<div style="width: 840px;">
Some Debug Info:
<br>
<?php
$ignore = array('GLOBALS', '_FILES', '_COOKIE', '_POST', '_GET', '_SERVER', '_ENV', 'ignore');
// diff the ignore list as keys after merging any missing ones with the defined list
$vars = array_diff_key(get_defined_vars() + array_flip($ignore), array_flip($ignore));
// should be left with the user defined var(s) (in this case $testVar)
var_dump($vars);
?>
</div>
</font>
</body>
</html>
<?php
/**
* PHP Script to benchmark PHP and MySQL-Server
*
* inspired by / thanks to:
* - www.php-benchmark-script.com (Alessandro Torrisi)
* - www.webdesign-informatik.de
*
* @author odan
* @version 2014.02.23
* @license MIT
*
*/
// -----------------------------------------------------------------------------
// Setup
// -----------------------------------------------------------------------------
set_time_limit(120); // 2 minutes
$arr_cfg = array();
// optional: mysql performance test
//$arr_cfg['db.host'] = 'localhost';
//$arr_cfg['db.user'] = 'root';
//$arr_cfg['db.pw'] = '';
//$arr_cfg['db.name'] = 'test';
// -----------------------------------------------------------------------------
// Main
// -----------------------------------------------------------------------------
// check performance
$arr_benchmark = test_benchmark($arr_cfg);
// html output
echo "<!DOCTYPE html>\n<html><head>\n";
echo "<style>table {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
margin:0px;
padding: 0px;
border:#ccc 1px solid;
border-collapse:collapse;
}
td, th {
border:#ccc 1px solid;
vertical-align: top;
}</style></head><body>";
echo array_to_html($arr_benchmark);
echo "\n</body></html>";
exit;
// -----------------------------------------------------------------------------
// Benchmark functions
// -----------------------------------------------------------------------------
function test_benchmark($arr_cfg)
{
$time_start = microtime(true);
$arr_return = array();
$arr_return['version'] = '1.1';
$arr_return['sysinfo']['time'] = date("Y-m-d H:i:s");
$arr_return['sysinfo']['php_version'] = PHP_VERSION;
$arr_return['sysinfo']['platform'] = PHP_OS;
$arr_return['sysinfo']['server_name'] = $_SERVER['SERVER_NAME'];
$arr_return['sysinfo']['server_addr'] = $_SERVER['SERVER_ADDR'];
test_math($arr_return);
test_string($arr_return);
test_loops($arr_return);
test_ifelse($arr_return);
if (isset($arr_cfg['db.host'])) {
test_mysql($arr_return, $arr_cfg);
}
$arr_return['total'] = timer_diff($time_start);
return $arr_return;
}
function test_math(&$arr_return, $count = 99999)
{
$time_start = microtime(true);
$mathFunctions = array("abs", "acos", "asin", "atan", "bindec", "floor", "exp", "sin", "tan", "pi", "is_finite", "is_nan", "sqrt");
for ($i = 0; $i < $count; $i++) {
foreach ($mathFunctions as $function) {
$r = call_user_func_array($function, array($i));
}
}
$arr_return['benchmark']['math'] = timer_diff($time_start);
}
function test_string(&$arr_return, $count = 99999)
{
$time_start = microtime(true);
$stringFunctions = array("addslashes", "chunk_split", "metaphone", "strip_tags", "md5", "sha1", "strtoupper", "strtolower", "strrev", "strlen", "soundex", "ord");
$string = 'the quick brown fox jumps over the lazy dog';
for ($i = 0; $i < $count; $i++) {
foreach ($stringFunctions as $function) {
$r = call_user_func_array($function, array($string));
}
}
$arr_return['benchmark']['string'] = timer_diff($time_start);
}
function test_loops(&$arr_return, $count = 999999)
{
$time_start = microtime(true);
for ($i = 0; $i < $count; ++$i)
;
$i = 0;
while ($i < $count) {
++$i;
}
$arr_return['benchmark']['loops'] = timer_diff($time_start);
}
function test_ifelse(&$arr_return, $count = 999999)
{
$time_start = microtime(true);
for ($i = 0; $i < $count; $i++) {
if ($i == -1) {
} elseif ($i == -2) {
} else if ($i == -3) {
}
}
$arr_return['benchmark']['ifelse'] = timer_diff($time_start);
}
function test_mysql(&$arr_return, $arr_cfg)
{
$time_start = microtime(true);
$link = mysqli_connect($arr_cfg['db.host'], $arr_cfg['db.user'], $arr_cfg['db.pw']);
$arr_return['benchmark']['mysql']['connect'] = timer_diff($time_start);
// //$arr_return['sysinfo']['mysql_version'] = '';
mysqli_select_db($link, $arr_cfg['db.name']);
$arr_return['benchmark']['mysql']['select_db'] = timer_diff($time_start);
$result = mysqli_query($link, 'SELECT VERSION() as version;');
$arr_row = mysqli_fetch_assoc($result);
$arr_return['sysinfo']['mysql_version'] = $arr_row['version'];
$arr_return['benchmark']['mysql']['query_version'] = timer_diff($time_start);
$query = "SELECT BENCHMARK(1000000,ENCODE('hello','goodbye'));";
$result = mysqli_query($link, $query);
$arr_return['benchmark']['mysql']['query_benchmark'] = timer_diff($time_start);
mysqli_close($link);
$arr_return['benchmark']['mysql']['total'] = timer_diff($time_start);
return $arr_return;
}
function timer_diff($time_start)
{
return number_format(microtime(true) - $time_start, 3);
}
function array_to_html($my_array)
{
$strReturn = '';
if (is_array($my_array)) {
$strReturn .= '<table>';
foreach ($my_array as $k => $v) {
$strReturn .= "\n<tr><td>";
$strReturn .= '<strong>' . htmlentities($k) . "</strong></td><td>";
$strReturn .= array_to_html($v);
$strReturn .= "</td></tr>";
}
$strReturn .= "\n</table>";
} else {
$strReturn = htmlentities($my_array);
}
return $strReturn;
}
Voici donc les résultats de quelques tests:
Benchmark d'un hébergement mutualisé low cost, hébergeur russe
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-05 15:13:27
Server : www.xxx.com@195.x.x.x
PHP version : 5.2.17
Platform : Linux
--------------------------------------
test_math : 4.943 sec.
test_stringmanipulation : 6.030 sec.
test_loops : 6.474 sec.
test_ifelse : 5.044 sec.
--------------------------------------
Total time: : 22.491 sec.
perform
PHP 5.2.17, 1.1, 2015-03-05 This Server (www.xxx.com, 195.x.x.x, Linux) 28.5927
benchmark sql
version 1.1
sysinfo
time 2015-03-05 16:10:37
php_version 5.2.17
platform Linux
server_name www.xxx.com
server_addr 195.x.x.x
mysql_version 5.5.42-37.1
benchmark
math 3.569
string 4.719
loops 0.390
ifelse 0.583
mysql
connect 0.002
select_db 0.002
query_version 0.002
query_benchmark 0.416
total 0.416
total 9.676
-----------------------------------------------
Benchmark d'un hébergement Performance 2 by OVH
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-05 21:13:47
Server : www.xxx.com@10.x.x.x
PHP version : 5.4.38
Platform : Linux
--------------------------------------
test_math : 1.320 sec.
test_stringmanipulation : 1.314 sec.
test_loops : 0.675 sec.
test_ifelse : 0.538 sec.
--------------------------------------
Total time: : 3.847 sec.
perform
PHP 5.4.38, 1.1, 2015-03-05 This Server (www.xxx.com, 10.x.x.x, Linux) 8.9881
benchmark mysql
mysql privé 128 Mo
version 1.1
sysinfo
time 2015-03-05 22:15:28
php_version 5.4.38
platform Linux
server_name www.xxx.com
server_addr 10.x.x.x
mysql_version 5.1.31
benchmark
math 1.021
string 1.096
loops 0.039
ifelse 0.065
mysql
connect 0.013
select_db 0.016
query_version 0.025
query_benchmark 45.793
total 45.794
total 48.014
sql perso 800 Mo
version 1.1
sysinfo
time 2015-03-05 22:21:26
php_version 5.4.38
platform Linux
server_name www.xxx.com
server_addr 10.x.x.x
mysql_version 5.1.73-2+squeeze+build1+1-log
benchmark
math 0.931
string 1.004
loops 0.035
ifelse 0.059
mysql
connect 0.006
select_db 0.007
query_version 0.008
query_benchmark 0.163
total 0.163
total 2.193
SQL Pro 4Go
version 1.1
sysinfo
time 2015-03-05 22:26:05
php_version 5.4.38
platform Linux
server_name www.xxx.com
server_addr 10x.x.x
mysql_version 5.1.73-2+squeeze+build1+1-log
benchmark
math 0.932
string 1.007
loops 0.035
ifelse 0.060
mysql
connect 0.002
select_db 0.002
query_version 0.002
query_benchmark 0.174
total 0.174
total 2.208
sql privé 256 Mo
version 1.1
sysinfo
time 2015-03-06 22:48:35
php_version 5.4.38
platform Linux
server_name www.xxx.com
server_addr 10.x.x.x
mysql_version 5.5.14
benchmark
math 1.012
string 1.089
loops 0.040
ifelse 0.067
mysql
connect 0.002
select_db 0.002
query_version 0.003
query_benchmark 0.384
total 0.384
total 2.591
------------------------------------------
Benchmark localhost sur un I7 Windows 8 Pro 64 bits
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-05 20:18:55
Server : localhost@::1
PHP version : 5.4.12
Platform : WINNT
--------------------------------------
test_math : 3.489 sec.
test_stringmanipulation : 4.641 sec.
test_loops : 3.875 sec.
test_ifelse : 2.679 sec.
--------------------------------------
Total time: : 14.684 sec.
perform
PHP 5.4.12, 1.1, 2015-03-05 This Server (localhost, ::1, WINNT) 15.4877
benchmark sql
version 1.1
sysinfo
time 2015-03-05 21:02:15
php_version 5.4.12
platform WINNT
server_name localhost
server_addr ::1
mysql_version 5.1.40-community-log
benchmark
math 2.443
string 3.592
loops 0.268
ifelse 0.293
mysql
connect 1.023
select_db 1.023
query_version 1.023
query_benchmark 6.359
total 6.359
total 12.955
benchmark mysql
version 1.1
sysinfo
time 2015-03-05 21:29:49
php_version 5.4.12
platform WINNT
server_name localhost
server_addr ::1
mysql_version 5.1.40-community-log
benchmark
math 2.464
string 3.532
loops 0.273
ifelse 0.293
mysql
connect 1.023
select_db 1.023
query_version 1.023
query_benchmark 6.345
total 6.346
total 12.908
-----------------------------------------------------------------
Benchmark d'un VPS hébergé dans les pays de l'est
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-06 00:22:01
Server : www.xxx.com@5.x.x.x
PHP version : 5.3.28
Platform : Linux
--------------------------------------
test_math : 4.238 sec.
test_stringmanipulation : 4.446 sec.
test_loops : 4.219 sec.
test_ifelse : 2.454 sec.
--------------------------------------
Total time: : 15.357 sec.
perform
PHP 5.3.28, 1.1, 2015-03-06 This Server (www.xxx.com, 5.x.x.x, Linux) 23.1604
benchmark mysql
no mysqli support
-------------------------------------------------------
Benchmark mutualisé 1and1 basic
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-05 21:26:24
Server : xxx.com@217.x.x.x
PHP version : 5.5.20
Platform : Linux
--------------------------------------
test_math : 1.966 sec.
test_stringmanipulation : 2.000 sec.
test_loops : 1.072 sec.
test_ifelse : 0.908 sec.
--------------------------------------
Total time: : 5.946 sec.
perform
PHP 5.5.20, 1.1, 2015-03-05 This Server (xxx.com, 217.x.x.x, Linux) 13.0812
benchmark mysql
version 1.1
sysinfo
time 2015-03-05 22:38:36
php_version 5.5.20
platform Linux
server_name xxx.com
server_addr 217.x.x.x
mysql_version 5.1.73-log
benchmark
math 1.608
string 1.641
loops 0.059
ifelse 0.104
mysql
connect 0.003
select_db 0.005
query_version 0.006
query_benchmark 0.195
total 0.195
total 3.607
--------------------------------------------------------------
Benchmark mutualisé 1and1 business
bench
--------------------------------------
| PHP BENCHMARK SCRIPT |
--------------------------------------
Start : 2015-03-05 21:49:37
Server : xxx.eu@217.x.x.x
PHP version : 5.4.35
Platform : Linux
--------------------------------------
test_math : 3.500 sec.
test_stringmanipulation : 2.954 sec.
test_loops : 1.133 sec.
test_ifelse : 0.926 sec.
--------------------------------------
Total time: : 8.513 sec.
perform
PHP 5.4.35, 1.1, 2015-03-05 This Server (xxx.eu, 217.x.x.x, Linux) 12.9439
benchmark mysql
version 1.1
sysinfo
time 2015-03-05 22:42:42
php_version 5.4.35
platform Linux
server_name xxx.eu
server_addr 217.x.x.x
mysql_version 5.1.73-log
benchmark
math 1.528
string 1.747
loops 0.078
ifelse 0.107
mysql
connect 0.006
select_db 0.007
query_version 0.008
query_benchmark 0.337
total 0.337
total 3.798
On peut en conclure différentes choses:
-le premier hébergement a des performances pas terribles, mais c'est un mutualisé assez basique
-l'hébergement OVH Performance 2 a les meilleures performances (le résultat du bench sqlprivé 128 Mo est simplement du au fait que le serveur était dans les choux et q'il fallait le rebooter)
-un localhost sur un ordi Windows 8 avec un I7 (pas du tout une config serveur) est plus performant qu'un mutualisé de base
-un VPS a par définition généralement de moins bonnes performances, ne serait ce que par la perte due à la virtualisation
-les offres 1and1 basic et 1and1 business ne semblent pas avoir de différences flagrantes niveau performances, l'offre business a meme de moins bons résultats avec certains benchs alors qu'elle est plus chère, tout porte à croire que c'est plus ou moins la meme offre vendue sous deux noms différents.
N'hésitez pas à tester vos hébergements avec les benchmarks, et à partager vos résultats
]]>