-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'ab' is not fast enough #62
Comments
Thank you for your information. |
Indeed, I like |
I want to add that concurrency 10 is quite low, on my machine increasing concurrency to higher values and time to at least 5 seconds shows significantly different results. |
https://github.com/dejurin/php-micro-router-framework-benchmark enjoy 👍 ) |
A real benchmark using wrk: https://github.com/TechEmpower/FrameworkBenchmarks @dejurin Enjoy 👍 |
When benchmarking, It is very important to see the CPU usage, for find the bottlenecks.
With this benchmark using 3s per fw, it is not easy to control the CPU usage.
But changing to 30s per fw, It's possible.
The slowest frameworks are saturating the CPU (~100% usage), and that is correct. But the fastest frameworks only ~70% CPU usage. And the CPU usage increase with the low performant frameworks.
The problem is
ab
that can't give enough food (requests) to the fastest frameworks. We are benchmarking theab
performance, not the php performance.Core i7 860 @ 2.80GHz × 8 PHP 5.5.9
ab -c 10 -t 3 http://localhost/hello.php(.html)
wrk -t10 -c10 -d3s --latency http://localhost/hello.php(.html)
But perhaps only happens with fast CPUs, so I tried with:
Core 2 Duo 2.53Ghz PHP 5.6.21
ab -c 10 -t 3 http://localhost/hello.php
wrk -t10 -c10 -d3s --latency http://localhost/hello.php
Exactly the same, we calculate the ratio:
The ratio is very similar, so It's only an
ab
performance limitation, independent of which CPU.This ratio decrease proportionally to the low performance of the framework. Where
ab
is fast enough for the slowest frameworks.For example, with the core i7, one of the fastest fw go from ~10.000 to ~16.000 req/s (more than hello.html with ab). And one of the slowest fw go only from 603 to 634 req/s.
This actual benchmark, is completely limited by
ab
performance.Please use
wrk
, a modern HTTP benchmarking tool.https://github.com/wg/wrk
https://github.com/wg/wrk/wiki/Installing-Wrk-on-Linux
The text was updated successfully, but these errors were encountered: