Little help with my VPS

DA-LION-619

Honorary Master
Joined
Aug 22, 2009
Messages
13,774
Reaction score
1,613
Location
Randburg
So I have a VPS running Ubuntu with the following specs

CPU Cores: 2
Memory (RAM): 512MB
Swap (SWAP): 256MB
Disk Space: 20 GB

I basically use it for my PHP scripts nothing else major, today I noticed through the day the VPS was "freezing" I couldn't open the directories in my browser & I had to reboot to get it working. I thought it was the RAM so I upgraded it to 512 from 256 & the problem stopped.

Capture.jpg

As you can see, as soon as I upgraded the system started making use of the extra RAM, any reason why?
 
What was using the memory when it maxed out in the first pic?
Not sure, as I don't normally monitor the logs and stuff just went through it today after this freezing occurrence.

In the 2nd pic I uploaded, does everything look fine?
 
Last edited:
Linux systems will generally always make use of as much memory the system can provide. It doesn't mean that it's being used by any particular application.
 
Your image of "top" doesn't give you the information you need. You need to know how to manipulate the view to take advantage of the app.

Do this.
Launch "top".
Press: "<" to change the sorting to another column other than CPU usage. Press it 4 times to sort by "virt"ual memory requested by app. Or ">" once to sort by current % memory in use.

This is because by default top sorts by cpu usage, right now you are interested in memory usage. I have a 256MB VPS which also had memory issues, causes mysql to crash. Found out it was php-fpm, and after optimising it for low memory vps, all my problems disappeared.
 
Turns out it wasn't a memory issue, just a script locking so I downgraded back to 256MB since it's adequate enough.
 
To be fair 512MB of RAM is nothing. You should have 2GB at least, preferably 4GB.

Not necessary if you don't need it. 256MB is fine for small PHP testbeds, 512MB or greater is definitely recommended when you start adding a DB though.
 
switch to debian. ubuntu takes quite some sauce from the available resource pool. easy and convenient comes at a price...

mysql doesn't set itself to use the optimal amount of memory for your vps, you need to do this yourself. playing a bit with that you can run it at an even lower amount of ram, but you won't be able to store a lot of things.

php can also be changed to use less features you don't really need, almost in the same way as above.

the trend follows for other things you're not really using.
 
playing a bit with that you can run it at an even lower amount of ram, but you won't be able to store a lot of things.

With low RAM you can still store up to the max HDD size, you just can't have many indexes making the DB horrendously slow.
 
Top
Sign up to the MyBroadband newsletter
X