Is wrk benchmark tool reliable for testing fastest php framework

1k Views Asked by At

So I tried to test php framework on my localhost (6 year old i7 pc) using:

wrk -t12 -c100 -d30s http://127.0.0.1
  • Laravel without DB I've got: 698 request per second
  • Cakephp: 1,400 rps
  • Swoole : 197,000 rps
  • Swoole with middleware (fastroute, etc) for API: 176,000 rps

enter image description here

Is wrk reliable and I can tell to my boss that my api can process 170k request per second?

2

There are 2 best solutions below

0
On BEST ANSWER

Yes, Wrk is one of the most respected benchmarking tool but you can not tell you boss that your application will handle 176,000 requests/second

because there will be some added conditions which will reduce the application performance. To get the correct benchmark score you can test by replicating all those conditions on your development environment and try benchmarking.

Conditions like

  1. Database Connection (if Application is using Database)
  2. Server Configuration
  3. Reverse Proxy from your HTTP Server (i.e. Nginx or Apache) Very important
  4. And other application-specific conditions
2
On

I also have one Swoole based application with a little processing and DB connection.

I benchmarked the application using wrk.

First without Nginx proxy using my Swoole server on localhost

and then using Nginx reverse proxy please find below the benchmark score

Swoole Benchmark using wrk