1

I'm not really sure what's happening with my memory. I have 31G total of memory, used is 1G, and free is 9G.

My question is, why is it, I only have 9G and 1G = 10G. It's far from the total memory which is 31G.

I'm hoping to look around 1G used and ~29G free. Can anyone help explain about this?

$ free -m
              total        used        free      shared  buff/cache   available
Mem:          31757        1264        9377         342       21114       29855
Swap:          2047           2        2044

$ free -g
              total        used        free      shared  buff/cache   available
Mem:             31           1           9           0          20          29
Swap:             1           0           1
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
paolooo
  • 4,133
  • 2
  • 18
  • 33
  • 1
    Those numbers add up. Why do you ignore the rest of the columns? – Karoly Horvath Oct 31 '15 at 11:33
  • I didn't include it because I thought it shouldn't be include. Based from this example ( http://www.linuxnix.com/find-ram-size-in-linuxunix/ ) - as you can see the total memory usage = used + free memory. However, after checking the man and this post ( http://stackoverflow.com/questions/30772369/linux-free-m-total-used-and-free-memory-values-dont-add-up ) I realized that it should be included. Anyway, thank you for your comment as it is a very helpful idea. :) – paolooo Nov 01 '15 at 08:21

1 Answers1

0
buff/cache: 21114

Your operating system uses "free" memory for caching.

From wikipedia:

Usually, all physical memory not directly allocated to applications is used by the operating system for the page cache. Since the memory would otherwise be idle and is easily reclaimed when applications request it, there is generally no associated performance penalty [...]

Karoly Horvath
  • 94,607
  • 11
  • 117
  • 176