Freeing page cache using echo 3 > /proc/sys/vm/drop_caches doesn't work?
I've always done:
echo 3 | sudo tee /proc/sys/vm/drop_caches
From a sudo
prompt, here's a one-liner you can use:
# free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m
total used free shared buff/cache available
Mem: 7840 1958 2775 739 3106 4795
Swap: 7999 0 7999
total used free shared buff/cache available
Mem: 7840 1958 4698 734 1183 4860
Swap: 7999 0 7999
This freed up 2 GiB of buffer/cache. It went from 3.1 GB to 1.2 GB.
So it works as it should, however in your case you didn't have buffered storage in RAM that could be flushed out.