I need to compare the performance of three different computers, each of which starts a web server. My idea is that for the same php script is processed on each server, the one that can serve the largest number. Customers with a given load limit will be the most powerful.
To implement this, I have one PHP script that basically does some heavy math calculations. I maintain the number of clients as a static value. The script will run indefinitely until we say that the processor load is 95%. when the load reaches 95%, the script should stop for all clients. And at this limit one of the best customers will be the best.
The general structure of this php script is as follows:
static $clients_count=0; static $sys_load=0; //increment clients_count $clients_count++; while(sys_load<=95) { do_heavy_maths(); //calculate current cpu load sys_load=get_cpu_load(); } echo "No. of max. clients this server handled: $clients_count";
So now I have a few questions:
- - my approach to the correct comparison of results. (PS should I use benchmarking web interface)?
- How to determine no. clients connected to my server?
- Pls provides the best way to find CPU utilization. (It is difficult to make the maximum cpu limit using load_averages, which can be obtained by reading from / proc / loadavg).
Thanx ..
source share