Linux (kernel) makes use of unused memory for page cache (and buffer cache - it still exists) to for performance.
free
-> not used for anything
echo 3 > /proc/sys/vm/drop_caches
frees pagecache, dentries and inodes which will return page cache / buffer cache to "free".
Ubuntu 14.04
# free -m
total used free shared buffers cached
Mem: 1375 1289 85 5 112 302
-/+ buffers/cache: 875 500
Swap: 0 0 0
# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 87660 115120 309500 0 0 1 9 4 18 0 0 100 0 0
# echo 3 > /proc/sys/vm/drop_caches
# vmstat
fprocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 512720 2236 25756 0 0 1 9 4 18 0 0 100 0 0
# free -m
total used free shared buffers cached
Mem: 1375 874 500 5 2 25
-/+ buffers/cache: 847 528
Swap: 0 0 0
buffers
and cached
will drop and free
will increase but that doesn't mean you have more memory available for applications.
In your case, looking at + buffers/cache
which is 10728MB, this was the current available memory for applications.
For more information, check Linux ate my RAM!
BTW: Fedora and Arch Linux use free
from procps-ng
output is different.
The output combines buff/cache and removed the somewhat confusing -/+ buffers/cache
.
We can clearly see buff/cache
dropped but available
didn't change. I personally think it is a better implementation/interpretation.
# free -m
total used free shared buff/cache available
Mem: 1874 117 18 1 1737 1708
Swap: 0 0 0
# echo 3 > /proc/sys/vm/drop_caches
# free -m
total used free shared buff/cache available
Mem: 1874 117 1654 1 102 1708
Swap: 0
echo "3" | sudo tee /proc/sys/vm/drop_caches
. By the way, I agree with the comment from muru.cached
currently in use.