tarampampam / laravel-roadrunner-in-docker

:rocket: An example of Laravel app that runs in a docker container with RoadRunner
MIT License
179 stars 36 forks source link

poor peformance vs nginx #67

Closed mybigman closed 3 years ago

mybigman commented 3 years ago
#httpd-tools

ab -n 5000 -c 500 http://localhost:29999/

A lot of failed requests

Server Software:
Server Hostname:        localhost
Server Port:            29999

Document Path:          /
Document Length:        22043 bytes

Concurrency Level:      500
Time taken for tests:   109.117 seconds
Complete requests:      5000
Failed requests:        3168
   (Connect: 0, Receive: 0, Length: 3168, Exceptions: 0)
Non-2xx responses:      3168
Total transferred:      42810696 bytes
HTML transferred:       40382776 bytes
Requests per second:    45.82 [#/sec] (mean)
Time per request:       10911.694 [ms] (mean)
Time per request:       21.823 [ms] (mean, across all concurrent requests)
Transfer rate:          383.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    5  15.7      0      85
Processing:   128 10392 1884.6  10465   14760
Waiting:       13 10391 1885.1  10463   14759
Total:        129 10397 1875.3  10466   14760

Percentage of the requests served within a certain time (ms)
  50%  10466
  66%  10923
  75%  11178
  80%  11394
  90%  12019
  95%  13052
  98%  13947
  99%  14413
 100%  14760 (longest request)

With default install of laravel and nginx using php-fpm

Server Software:        nginx
Server Hostname:        localhost
Server Port:            19999

Document Path:          /
Document Length:        17594 bytes

Concurrency Level:      500
Time taken for tests:   71.707 seconds
Complete requests:      5000
Failed requests:        575
   (Connect: 0, Receive: 0, Length: 575, Exceptions: 0)
Total transferred:      83446650 bytes
HTML transferred:       77853450 bytes
Requests per second:    69.73 [#/sec] (mean)
Time per request:       7170.715 [ms] (mean)
Time per request:       14.341 [ms] (mean, across all concurrent requests)
Transfer rate:          1136.44 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   11  30.8      0     128
Processing:     0 6734 3248.0   7197   27931
Waiting:        0 6728 3253.1   7192   27930
Total:          1 6745 3241.8   7206   27931

Percentage of the requests served within a certain time (ms)
  50%   7206
  66%   7807
  75%   8257
  80%   8550
  90%   9115
  95%   9808
  98%  10848
  99%  17728
 100%  27931 (longest request)
tarampampam commented 3 years ago

Hi, and thanks for your issue!

How to reproduce? Configurations, sources, details?

tarampampam commented 3 years ago

@mybigman Could you please provide more details?

mybigman commented 3 years ago

sorry for delay...

I just used your Dockerfile and ran rr serve .rr.local.yaml then ran the AB test.

Does that help?

tarampampam commented 3 years ago

.rr.local.yaml is for development only:

https://github.com/tarampampam/laravel-roadrunner-in-docker/blob/e0875b9ec37968233e4a5e54ac9c5d2e65336e89/.rr.local.yaml#L1-L3

Try to use .rr.yaml instead for any performance tests

tarampampam commented 3 years ago

@mybigman this issue can be closed?

tarampampam commented 3 years ago

Closed due to inactivity