Hi,
I got a 2GB memory droplet and seems like my free-m is not couting correct my free memory OR something is using more than it should…
I did some reasearch and i found that i can “count” my usar memory by this command:
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
Quick math all my main process are using 500MB memory… with the minor ones… it should reach 600MB top.
but free -m show that i only have 300MB left… and 800MB cached…
Just to you know i running 4 nodejs applications (3 ghost blogs and 1 express)
Any thoughts about it?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
On Linux, cached memory is still available for use. So when looking at the output of
free -m
the “available” column is likely what you want to be looking at rather than the “free” one.The output of
ps
can also be a bit misleading. This blog post covering memory usage on Linux has a good explanation: