From owner-freebsd-fs@freebsd.org Thu Nov 24 21:44:16 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9BD0C54740 for ; Thu, 24 Nov 2016 21:44:16 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D6611A6 for ; Thu, 24 Nov 2016 21:44:15 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 8316528461; Thu, 24 Nov 2016 22:44:13 +0100 (CET) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id E66DE28426; Thu, 24 Nov 2016 22:44:11 +0100 (CET) Subject: Re: how to clear FS cache To: Konstantin Belousov Cc: freebsd-fs@FreeBSD.org References: <583756CC.7000506@quip.cz> <20161124213439.GV54029@kib.kiev.ua> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <58375F2B.1000904@quip.cz> Date: Thu, 24 Nov 2016 22:44:11 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <20161124213439.GV54029@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 21:44:16 -0000 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