how to clear FS cache

Konstantin Belousov kostikbel at gmail.com
Thu Nov 24 21:34:45 UTC 2016


On Thu, Nov 24, 2016 at 10:08:28PM +0100, Miroslav Lachman wrote:
> Is there a way to clear FS read cache between some benchmar runs?
> 
> I am looking for something like this on linux
> 
> $ sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"

cd /your/mount/point
umount /your/mount/point

First command makes the mount point busy, so the unmount fails.  But before
failing, it flushes everything that is not used.


More information about the freebsd-fs mailing list