How to determine the max. no. of clients that my web server can handle?
<p>i need to compare performance of 3 different computers each running a web server. My idea is that given same php script to process on each server, the one able to serve largest no. of clients at given load limit  will be the most powerful one.</p>

<p>To implement this, i have a single php script which basically does some  heavy maths calculations. I am maintaining clients count as a static value. The script will run infinitely until say the cpu load is 95%. when the load reaches 95% the script should stop for all clients. 
 And at this limit, the one system having largest clients count will be the best performer.</p>

<p>A general structure of this php script is as :</p>

<pre><code>static $clients_count=0;
static $sys_load=0;

//increment clients_count
$clients_count++;

while(sys_load&lt;=95)
{
do_heavy_maths();

//calculate current cpu load 
sys_load=get_cpu_load();
}

echo "No. of max. clients this server handled: $clients_count";
</code></pre>

<p>So now i have a few questions :</p>

<ol>
<li>is my approach of comparing CPU peformances correct . (PS i have to use web based 
benchmarking only) ?</li>
<li>How to determine the no. of clients connected to my server ?</li>
<li>Pls provide a better way to find cpu load. (It's hard to draw a max. cpu limit using load_averages
that one can get by reading from /proc/loadavg).</li>
</ol>

<p>Thanx..</p>
