wrk -t4 -c400 -d10s http://127.0.0.1:1337/
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.02ms 6.94ms 82.86ms 85.27%
Req/Sec 827.17 552.85 2.38k 66.54%
22543 requests in 10.07s, 3.61MB read
Socket errors: connect 151, read 22680, write 86, timeout 0
Requests/sec: 2238.19
Transfer/sec: 367.20KB
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 20.34ms 4.50ms 125.04ms 97.89%
Req/Sec 3.09k 1.93k 6.06k 55.00%
122838 requests in 10.02s, 23.66MB read
Socket errors: connect 151, read 69, write 73, timeout 0
Requests/sec: 12263.37
Transfer/sec: 2.36MB
@ifubar They both used the same number of CPU cores. Also note that raw swoole performance is in pair with nginx!! i couldn't believe it but i ran it several times and the result was consistent! Also note that in real world applications the difference is much less but nonetheless it proves that php can now be used even as a static file server!