free memory available?

zamrg

Senior Member
Joined
Oct 19, 2005
Messages
804
Reaction score
11
Location
Cape Town
I'm running Ubuntu Jaunty - Linux xxxxxxxx 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

When I check my memory with the command 'free -m', it shows I have 556 mb of memory free.
Code:
             total       used       free     shared    buffers     cached
Mem:          3014       2457        556          0        144       1733
-/+ buffers/cache:        579       2435
Swap:         6236        100       6135

The output of 'top' shows:
Code:
Mem:   3086820k total,  2556284k used,   530536k free,   149036k buffers

If I use the System Monitor under System -> Administration, it shows:
Code:
Memory
585.6 MiB (19.4%) of 2.9 GiB

Why does top and free show that I have 556+- mb of memory free whilst the system monitor shows 585+- mb memory in use (2487 mb free)? or am I doing something wrong here
 
OK, it's like this. The figures free reports are rounded, so sometimes the totals are a MB or two off. In the first row:

556 + 144 + 1733 = 2433

That's just about what the second column shows under free. Buffers and cache is used by the kernel for various things, like file system caching. But if that memory is ever requested, it will be freed up immediately, so it is essentially free memory.

The second row shows you the used and free memory, including the buffers/cache, so this is pretty much what your system is using for applications and how much memory you really have available.
 
Last edited:
Buffers and cache is used by the kernel for various things, like file system caching. But if that memory is ever requested, it will be freed up immediately, so it is essentially free memory.

That's is some really useful info there!

Many people (including myself) would not realise this, and then go out and buy some more RAM, when it's not critically required (although it won't hurt either :))
 
Linux caches a lot of memory (which is essentially free) so it always looks like it is using more memory than it actually is.
 
Top
Sign up to the MyBroadband newsletter
X