When you want to empty disk caches/buffers, you usually issue the following command:
# sync && echo 3 > /proc/sys/vm/drop_caches
But after typing that command, free
doesn't really report 0
in the buff/cache
column. Here's an example:
# free -m
total used free shared buff/cache available
Mem: 7.6Gi 2.9Gi 3.6Gi 238Mi 1.1Gi 4.1Gi
Swap: 9.8Gi 1.0Mi 9.8Gi
Total: 17Gi 2.9Gi 13Gi
# sync && echo 3 > /proc/sys/vm/drop_caches
# free -m
total used free shared buff/cache available
Mem: 7.6Gi 2.8Gi 4.2Gi 224Mi 588Mi 4.2Gi
Swap: 9.8Gi 1.0Mi 9.8Gi
Total: 17Gi 2.8Gi 13Gi
So, there was 1.1G
in cache, and it droped to 588M
.
Can this 588M
drop to 0
? If (probably) not, why? And, Is there a way to find out how much caches/buffers will be left in advance after issuing sync
and writing to the /proc/sys/vm/drop_caches
file?