81

The output of the free command that I fired on my linux host is as belows:

free
              total        used        free      shared  buff/cache   available
Mem:      263846320    47746620     3290072     1140808   212809628   214382420
Swap:             0           0           0

I am not able to figure out what this available part is specifying. The free memory is very less shown i.e around 1.24% even though the total memory is way high and used memory is around 18.09% only.

free -h
              total        used        free      shared  buff/cache   available
Mem:           251G         45G        3.1G        1.1G        202G        204G
Swap:            0B          0B          0B

Does it mean I wont be able to start more applications as free memory is very less. The used memory is 18% only. So shouldn't free memory be 72% and not 1.24% as the command is showing above.

I am confused. Can anyone help?

muru
  • 193,181
  • 53
  • 473
  • 722
Nishant Lakhara
  • 913
  • 1
  • 6
  • 6

1 Answers1

89

In the output of free,

  • Free memory is the amount of memory which is currently not used for anything. This number should be small, because memory which is not used is simply wasted.

  • Available memory is the amount of memory which is available for allocation to a new process or to existing processes.

The example given in the question shows a healthy system.

AlexP
  • 10,037
  • 1
  • 32
  • 39
  • 4
    How the available and buff/cache columns are different from each other. – srinivas Jan 02 '19 at 13:15
  • 1
    @srinivas, `available` does include `free` column + a part of `buff/cache` which can be reused for current needs *immediately* – ALZ Nov 08 '19 at 10:36
  • 9
    this answer convoluted things for me even more – markroxor Aug 13 '20 at 08:48
  • 1
    Yeah I also don't get it... How is the *free* memory different from *available*? Apparently free is a subset of available, but.... what? How? Why? More questions than answers. – Simon Forsberg Aug 21 '20 at 22:15
  • 15
    Ok, I just read https://www.linuxatemyram.com/ which explains a lot. – Simon Forsberg Aug 21 '20 at 22:24
  • 1
    yes, http://linuxatemyram.com explains it. Available memory is free memory + disk cache memory (which can be released by kernel immediately when needed). – gaoithe Nov 21 '20 at 09:38
  • [Linux server needs a RAM upgrade?](https://haydenjames.io/linux-server-need-ram-upgrade-lets-check-free-top-vmstat-sar) Just adding this link here may be helpful for someone! – Arun Nov 27 '21 at 00:24