Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2016 22:44:11 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: how to clear FS cache
Message-ID:  <58375F2B.1000904@quip.cz>
In-Reply-To: <20161124213439.GV54029@kib.kiev.ua>
References:  <583756CC.7000506@quip.cz> <20161124213439.GV54029@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov wrote on 2016/11/24 22:34:
> 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.

Nice trick, thank you! :)

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58375F2B.1000904>