Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a VPS with directadmin installed on.
The amount of memory I bought from my VPS provider is 1GB and in the system it it shows that I have 1GB of memory available.
From the beginning I regularly checked the memory usage of the system, and it never came below 600MB. I thought it's ok until recently. I suspect something must be wrong, because my memory usage now is above 850MB.

I used the top and ps aux commands and got the list of running processes on the system. after doing the math I got that the memory usage of apache and mysql summed up should not be much above 500MB.
I then did something else: I deactivated the apache and mysql and again saw that the used memory is stuck around 600MB.

What I want to know here is, am I doing it wrong (calculating memory)? Or is my provider lying about the amount of memory they gave me? Is it even possible, or there's a hidden process eating up the system memory?

share|improve this question

closed as off-topic by HopelessN00b Apr 3 at 17:22

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Checked memory usage using what command? –  Paul Aug 1 '11 at 9:24
@Paul free -t -m –  Hamed Momeni Aug 1 '11 at 9:26
Please read If that doesn't answer your question, please post the output of the free command here. –  Sven Aug 1 '11 at 9:28
I'm pretty confident you're doing it wrong. –  womble Aug 1 '11 at 9:29
@SvenW well that's a relief! I would've picked your answer as the best if it wasn't a comment! ;) –  Hamed Momeni Aug 1 '11 at 9:35

2 Answers 2

up vote 8 down vote accepted

You have earned Confused by Linux memory usage badge!

Processes are not the only thing eating up memory in Linux. The frequently used files and directory entries are cached in RAM - that's because reading the files from RAM is lots faster than reading them from disk. I bet you didn't take buffers and cached columns into account while calculating the RAM usage. Those can be calculated as free RAM, too.

But don't you worry. Those caches and buffers automatically get flushed in no time if your applications actually need that RAM.

share|improve this answer
yup, I got it. you're right. :) thanks. –  Hamed Momeni Aug 1 '11 at 9:36

You are probably being confused by memory caching, see

There is a python script available at that will give you a slightly more accurate view of global and per-app memory usage.

share|improve this answer
thanks, it was a good script. –  Hamed Momeni Aug 1 '11 at 9:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.