3

Possible Duplicate:
How can I monitor the memory usage?

I see in System Monitor, used memory only 332MB, so free memory is ~3.4GB, but when I use command line: free -m, used memory is 1GB, free memory only 2.8GB.

I use command line: cat /proc/meminfo -> result same free -m.

Why? Who can help me?

Screenshot

Jack
  • 31

2 Answers2

2

It's all there. First line of free show that buffers take up 124, cache 543; 543 + 124 = 667, 1000 - 667 = 333. And this is what the second line of free (actually 332) shows.

That's the difference between "free memory" and "available" memory. Buffers / cache can be freed on a moment's notice, so they don't really count as "not available" memory in the System Monitor, but they also are not, strictly speaking, free memory.

From the point of view of the user, "available" memory is more important. Linux will max out the buffers / cache to speed up the system, but that does not mean that your mem is full and that system slows down due to lack of available memory.

January
  • 35,952
1

Have a look on the second line of the free output in your screenshot. This is labeled "-/+ buffers/cache:"

Where you find the equivalent values.

For more information see e.g. http://www.redhat.com/advice/tips/meminfo.html

Buffers: Memory in buffer cache. mostly useless as metric nowadays

Cached: Memory in the pagecache (diskcache) minus SwapCache

SwapCache: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)