Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cps's avatar
Level 1

Laravel app usages more than 90% CPU usages for only 100 concurrent users with high server configuration

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.

0 likes
3 replies
shez1983's avatar

laravel does use a lot and is also the slowest one - i think you need varnish outside of laravel not some package. you can also try using php;s opcache just turn it on..

qwertynik's avatar

@cps If you managed to optimize the config for your laravel application, can you share the changes done?

Please or to participate in this conversation.