El Fri, 26-05-2006 a las 14:45 -0500, Ryan McIntosh escribió:
> variables, but a better test might be to write a script to recursively
> call 2 or more pages or write a few pages that call each other n times
> and generate random content using PHP.  This tests how fast PHP passes
> the page handling off to the interpreter and also how fast the
> interpreter passes the random content back to cherokee as well as
> testing the interpreter itself.

Uhm... this is interesting.. you're suggesting we should make PHP
have the webserver get involved in a computation.. That suggests me of
some sort of recursive fuction.. say fibonacci or factorial but
calling the function over HTTP.. something in the way of this:

function factorial_over_http($n) {
  if ($n===1) {
    return 1;
  } else {
    $aux = file("http://localhost/factorial_over_http.php?n=";.($n-1));
    $aux = trim(implode("",$aux));
    return $n*intval($aux);
  }
} 

This is just a mockup.. haven't tried it or something.. just wanted
to illustrate my idea..in PHP code..
 
> For a computation/memory intensive benchmark, a great one is
> generating prime numbers, storing each prime found in a growing array.
> If each prime number candidates are tested against each 'discovered'
> prime number in the array this becomes memory and CPU intensive at the
> same time.  The benchmark can be the time it takes to calculate enough
> primes that the test system runs out of physical memory where lower =
> better.  I've used a C program to test out kernel configurations and
> memory speed on systems before and it's pretty good.  If you want it,
> I'll post it, but I'm not an accomplished PHP programmer.

I'd love to take a look and explore the idea in order to implement 
something similar for PHP...
 
> Perhaps another good test here might be to show apache's performance
> with native PHP vs. PHP_CGI handling just as a basis for further
> comparison.

Uhm.. not sure.. I guess the config for each server should be the
best possible.. e.g. Apache should use mod_php5 (PHP 5 is faster
then PHP 4 it looks like)... Dunno if I got your point...

> I'm quite interested in the benchmark results and will happily
> volunteer an AMD64 system for this testing if desired.

My whole idea about this benchmark is documenting it so well that
anybody can try it out on their own. At some point the hardware
variable starts to be the most interesting one I guess..

Nice feedback, thanks for it.

Antonio

_______________________________________________
Cherokee mailing list
[email protected]
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee

Reply via email to