Nino Paolo Nino Paolo - 9 months ago 37
Linux Question

My server's total memory doesn't match with USED + FREE memory. I'm using linux free command

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

Answer Source
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 [...]

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download