I ask a question, In my centos7, why available value less than free sometimes
I think available value is equal to free+buff+cache, available means when start a app how many memory can use?
[root@izuf6dbkdletdzecvyepl8z ~]# free -m
total used free shared buff/cache available
Mem: 992 160 380 342 451 44
Swap: 0 0 0
available
Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free
fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use
(MemAvailable in /proc/meminfo, available on kernels 3.14, emulated on kernels 2.6.27+, otherwise the same as free)
Best Answer
Buffered/cached is RAM that was used by a process - say, Firefox - but the process has ended. But the system doesn't actually need that ram right now, so why flush it out? Someone may want to read that Firefox binary and associated libs back into memory... so it is kept cached in RAM until that RAM is needed by a process OR the Firefox (or whatever) binary is re-launched.
You can test this by rebooting your system, and then after your desktop has fully loaded, etc. start Firefox or Chrome or the Gimp or some other larger app, and time how long it takes. Once it is open, close it. Wait a moment or three, maybe check via
ps
or other utils that it is really no longer running. Then start the timer and launch it again. Much faster, yes? That is because instead of re-reading the binaries/libs back into RAM it simply re-marks the cached RAM areas as "in use".