Support the ongoing development of Laravel.io →
Configuration Architecture

Hi everyone,

We just went live with our Laravel website (hooray!) but of course going live with something new, we know that we will encounter problems or bugs. The problem that we encountered was our website's article page was experiencing a cpu load of 100%. That page is getting data from the database using eloquent queries and some from Redis using laravel's Redis class. I would like to ask for some advice on how to improve our website performance? How to track down the cause of the high CPU load? Good practices when using Laravel's eloquent queries and Redis class?

So far we eliminated some eloquent queries by saving some of the data into Redis and pulling it there but it still wasn't enough.

Thanks!

Last updated 2 years ago.
0

I would like to know as well...

I used jmeter with 30 request in one go to access just the default page of laravel and it went up to around 50% already using amazon ec2 T2.medium server.

Thanks!

Last updated 2 years ago.
0

I got same problem on my VPS server (CentOS 7; PHP 5.4.16; CPU single Core, 1GB RAM + Apache-CGI/Nginx-FPM) between 10 until 20 request, it make CPU Load until 90% (what a shame)

I have searched any possible trouble maker (my code, PHP config, Server software config, etc), but still no correct solution.

Is there any correct suggestion? or this discussion (http://laravel.io/forum/08-12-2014-cpu-load-general-performance-question) has a correct result?

Thanx for any response

Last updated 2 years ago.
0

as vafrcor's linked post suggests you should cache some of the database queries, that could save some overhead.

after that both laravel and composer load a lot of files, both of them come with an optimize command for production environments.

For laravel :php artisan optimize For composer: composer dump-autoload --optimize

Calling laravel's optimize would be enough, since that one also calls composer's optimize command.

Last updated 2 years ago.
0
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.