1

Possible Duplicate:
How to understand the memory usage and load average in linux server

I'm running Debian and I'm wondering why so much of my memory is being used (8GB of the 8GB)

Is there any way I can check and see why so much RAM is being used?

Belgin Fish
  • 919
  • 5
  • 17
  • 31

3 Answers3

2

Linux uses a lot of RAM for cache. Please check the output of free -m to see how much you actually have free.

For example, look at the line at "-/+ buffers/cache under free vs. the "Mem" line free.

$ free -m
             total       used       free     shared    buffers     cached
Mem:         12040      11904        136          0        418       9641
-/+ buffers/cache:       1844      10195
Swap:        22889          0      22889

Also, check out http://www.linuxatemyram.com/

Cakemox
  • 25,209
  • 6
  • 44
  • 67
2

You haven't posted any details (say, for instance, the output of $ free -m), but I'm 99% certain most of that is being used by the kernel for a disk read cache. Memory being used this way is instantly released to any applications that request it. More info on this below.

Linux Ate My RAM!

EEAA
  • 109,363
  • 18
  • 175
  • 245
2

Regardless of the operating system, memory that isn't being used is memory you wasted good money purchasing. A modern operating system will try and use as much memory as possible to keep recently used (and likely to be used again) items in memory for fast access.

Caching stuff like this into memory that isn't currently needed for other things and freeing it up when a better use for it comes along is what makes your system perform so well.

Rob Moir
  • 31,884
  • 6
  • 58
  • 89