Empirically, your numbers should be right (meaning, they are what I would expect but, don't have time to look at your script right now)

Can you put about 500 of those scripts running in paralell and see how both architectures hold up?
Then, add SSL to your web server and check again.

--
JaimeC

On 09-12-2010 12:53, Martijn de Munnik wrote:
Hi,

We are migrating our webhosting platform from Solaris on I386 to OpenSolaris on 
SPARC. It seems our website work a lot faster on the I386 platform than on the 
SPARC platform. PHP seems to be the bottleneck and we believe it has something 
to do with the performance of PHP arrays. Our test script takes about 1.5s on 
I386 and about 4.5s on SPARC. The i386 is a Sun Fire V20z server, the SPARC is 
a Sun T5120 server. The test script is:

<?php
function getmicrotime($time)
{
     list($usec,$sec)=explode(" ",$time);
     return ((float)$usec+(float)$sec);
}

$start=microtime();
$a=array();
for($i=0; $i<1000000;$i++) {
   $a[] = $i;
}
$end=microtime();

$tijd=getmicrotime($end)-getmicrotime($start);
echo 'Duur van het uitvoeren: '.number_format($tijd*1000,5,',','.').' 
ms'.PHP_EOL;

$start=microtime();
foreach ($a as $i)
{
}
$end=microtime();

$tijd=getmicrotime($end)-getmicrotime($start);
echo 'Duur van het uitvoeren: '.number_format($tijd*1000,5,',','.').' 
ms'.PHP_EOL;
?>

I both used the PHP 5.2 from pkg.opensolaris.org and compiled my own version of 
PHP 5.3. Almost identical results.

Any ideas?

_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to