Jump to content

Memory usage on Linux


Feche1320

Recommended Posts

Posted (edited)

I am having a little problem with my server, I have a multi gamemode script and a VPS with 1GB of RAM, after an hour or so the server crashes due to memory limitations, it seems that it reaches the 1GB of RAM limit, and since the VPS doesn't have swap, the server crashes.

I use mySQL and there are no 'big' variables server-side, almost all request are sent to mySQL (for example, to get map name)

When I start the server the first time, the memory usage is around 350mb

If I stop all the resources, the memory doesn't go down, so for example if memory usage is 700mb and I stop all resources (actually, it's only ONE resource that holds everything), the memory stays on 700mb.

Is the solution to get more RAM or there is another issue?

Thanks.

Edited by Feche1320
  • 5 months later...
Posted

This is very interesting topic, because on linux I get also much higher memory usage in comparsion with windows if I can trust what ipb resource is showing to me. If I get on linux 1,6gb ram usage then on windows i get only ~200mb with the same scripts.

  • 1 year later...
Posted

I had the same problem, surely it is a bad optimization of the scripts, temporarily you can use this command use crontab to execute it every 1 hour or depending on how fast it runs out of resources.

this command will clean ram memory that mtasa has in cache (runs from time to time to clean)

sudo echo 1 > /proc/sys/vm/drop_caches

 

  • 1 month later...
Posted
On 29/12/2020 at 00:07, AaroN⍩ said:

I had the same problem, surely it is a bad optimization of the scripts, temporarily you can use this command use crontab to execute it every 1 hour or depending on how fast it runs out of resources.

this command will clean ram memory that mtasa has in cache (runs from time to time to clean)


sudo echo 1 > /proc/sys/vm/drop_caches

 

Thanks for sharing it. Do you have any other hint to save resources from the machine?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...