Jump to content

Memory usage on Linux


Feche1320

Recommended Posts

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
Link to post
  • 5 months later...

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.

Link to post
  • 1 year later...

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

 

Link to post
  • 1 month later...
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?

Link to post

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...