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

mmuqiitf's avatar

High RAM Usage Laravel in VPS (Hostinger)

Hello, i have a vps that contains 2 running laravel projects using Laravel+Filament only for UAT and Production. When i see the ram usage, i see approximately 2GB of RAMs are used in my VPS. These 2 projects are running a superviser for listening the queue and 2 cron jobs on crontab -e on every minutes. Is that significantly increase a memory or what?

This is screenshot when entering htop command. Screenshot of htop command in vps

This is screenshot when entering free -lm command. Screenshot of free -lm command in vps

Can anyone help me to reduce of RAM Usage on my VPS server?

0 likes
7 replies
JussiMannisto's avatar

@mmuqiitf You can see from htop that it's the database. And that's perfectly fine.

The database should utilize as much memory as practical, up to a limit*. The most important configuration variable is innodb_buffer_pool_size. The buffer pool is where InnoDB, the main storage engine of MySQL and MariaDB, caches table and index data. The more memory InnoDB can utilize, the fewer disk reads and swaps it has to do.

On a dedicated DB server, you might allocate 50%-80% of available RAM to the buffer pool. But if you're running everything on the same server, you'll have to be more conservative.

* Depends on the size of your database. There's no point in allocating 10GB for a database of 1GB.

1 like
mmuqiitf's avatar

@wew Thanks for explanations, this is very helpful for me because this is the first time i manage a VPS alone. So, you recommend it to add Swap Memory in my VPS right? I would gladly add swap memory on my VPS, is it good if swap memory space is 16GB for my VPS?

Please or to participate in this conversation.