1

I have migrated the existing application from core php to laravel framework. But the laravel application usage more than 90% cpu for the 100 concurrent users but the same application developed in core php usages the 5% cpu load only for the same load.

Then I have created one sample 'helloworld' application in laravel for load testing and result is the same. I have tested the laravel application using load testing tool siege, hits url 'siege www.mysite.com/helloworld -c250 -t20s' for 250 concurrent users (duration 20 sec) and still cpu load reaches more than 90% (linux centos 7.5 8 core 8 gb ram apache).

Also tested the core php file 'helloworld.php' using same load testing tool ('siege www.mysite.com/helloworld.php -c250 -t20s') but CPU usage not exceeded even 5%.

I am using

  • the latest php version ie 7.2
  • linux server centos 7.5 8 core 8 gb ram
  • apache
  • also tried the varnish http cache
  • laravel version 5.4 (also tried the 5.6 but the result is the same)

I don't know where is the issue I have tried everything but still not resolved the issue. Is there anything missing in the configuration on the server or in the coding end. Please suggest.

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14
CP Soni
  • 111
  • 4
  • Experiencing the exact same delima. Using seige with 100 concurrent users shoots cpu utilization up to 90 - 96% but ram utilization is only around 1-2GB. Did you ever discover what was causing this? – nullReference Mar 22 '19 at 19:57
  • Have you discover the solution? im facing the same problem laravel consume high cpu for only 100 concurrent user.. – ZeroOne Feb 16 '21 at 02:24

0 Answers0