Red Hat 7, Apache 2.4.6, 48 GB RAM, 16 cores
We have been doing some testing us both "ab" and "httperf" sending what we think are the same parameters. The # of processes and RAM usage look pretty much the same, but cpu usage is vastly different. Using "ab" seems to use a total average of 71% of cpu
resources. Using "httperf" looks to use 4.7% of total cpu resources. Also, the cpu% for each httpd process is pretty different.
Using "top" to analyze both …
1. Command: ab -t 500 -n 300000 -c 300 ourserver.com
Selected "top" output
%Cpu(s): 71.0 us
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10407 apache 20 0 415332 10064 3752 R 42.8 0.0 0:02.16 httpd
2. Command: httperf --hog —server ourserver.com --num-conn 300000 --ra 300
Selected "top" output
%Cpu(s): 4.7 us,
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10625 apache 20 0 415308 10060 3756 S 12.0 0.0 0:04.39 httpd
My questions are why are they so different, and which one most accurately reflects real traffic?
Thanks
|