react_on_rails icon indicating copy to clipboard operation
react_on_rails copied to clipboard

Concurrency performance

Open MarkWang2 opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Use the ab tool to test "hello wold" demo performance(same as our project), the performance dropped dramatically in Concurrency mode.

ab -n 50 -c 1 http://localhost:80/hello_world

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    40   45   2.3     44      51
Waiting:       35   38   2.7     37      48
Total:         41   45   2.3     44      51

Percentage of the requests served within a certain time (ms)
  50%     44
  66%     46
  75%     46
  80%     47
  90%     48
  95%     50
  98%     51
  99%     51
 100%     51 (longest request)
 
 
 ab -n 50 -c 10  http://localhost:80/hello_world
 
 Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:    60  211  56.1    218     320
Waiting:       35  205  54.6    214     301
Total:         61  211  56.0    219     320

Percentage of the requests served within a certain time (ms)
  50%    219
  66%    235
  75%    249
  80%    254
  90%    270
  95%    281
  98%    320
  99%    320
 100%    320 (longest request)

Describe the solution you'd like

Better concurrency performance.

MarkWang2 avatar Aug 10 '23 09:08 MarkWang2

@MarkWang2 what is the A and B of your test?

Did you try 13.4.0?

justin808 avatar Aug 11 '23 01:08 justin808

@MarkWang2 what is the A and B of your test?

Did you try 13.4.0? Use Apache ab load test tools to test. A one concurrency B ten concurrency。

Yes, tried 13.4.0

MarkWang2 avatar Aug 12 '23 09:08 MarkWang2

@MarkWang2 let me know if I'm interpreting your results correctly.

If you run a single request, you get results in 40~50ms. So 10 sequential requests would take 400~500ms.

However, if you run 10 requests simultaneously, then you get results between 60~300ms, with an average around 250ms, which is around the time required to run 5 requests sequentially.

If that's accurate, then I have to ask why you suspect there's room for improvement here & what tools you would recommend in order to identify the concurrency bottlenecks are.

Also, what was the value you had set for ReactOnRails' server_renderer_pool_size?

If you've examined our documentation for that configuration value, I think you're aware that it's the likely biggest bottleneck & not easy to improve either.

Judahmeek avatar Aug 13 '23 02:08 Judahmeek