42

In my System Monitor panel applet in Linux Mint 17.3 Cinnamon, it shows me memory usage of used memory and cached memory combined, whereas in the system monitor application, it just shows used memory, so the system monitor tends to show me much higher memory usage. What exactly is cached memory, and is it something to be worried about if a lot of memory is being used by it?

Rohan
  • 3,561

1 Answers1

53

Cached memory (shown as buff/cache in the output of the free command) is memory that Linux uses for disk caching. However, this doesn't count as "used" memory, since it will be freed when applications require it. Hence you don't have to worry if a large amount is being used; it counts as "free" memory.

Here's a nice page about memory usage and free, used, and cached RAM: http://www.linuxatemyram.com/ . Quoting from that page:

To see how much ram your applications could use without swapping, run free -m and look at the "available" column:

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           1504         636          13           0         855      792
Swap:          2047           6        2041

(...) If you just naively look at "free", you'll think your ram is 99% full when it's really just 42%!

dr_
  • 29,602