xfs
[Top] [All Lists]

Re: [Jfs-discussion] benchmark results

To: Larry McVoy <lm@xxxxxxxxxxxx>, Christian Kujau <lists@xxxxxxxxxxxxxxx>, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, Peter Grandi <pg_jf2@xxxxxxxxxxxxxxxxxx>, ext-users <ext3-users@xxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
Subject: Re: [Jfs-discussion] benchmark results
From: tytso@xxxxxxx
Date: Fri, 25 Dec 2009 11:33:41 -0500
In-reply-to: <20091225162238.GB19303@xxxxxxxxxxxx>
References: <alpine.DEB.2.01.0912240205510.3483@xxxxxxxxxxxxxxxxxx> <19251.26403.762180.228181@xxxxxxxxxxxxxxxxxx> <20091224212756.GM21594@xxxxxxxxx> <alpine.DEB.2.01.0912241739160.3483@xxxxxxxxxxxxxxxxxx> <20091225161453.GD32757@xxxxxxxxx> <20091225162238.GB19303@xxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Dec 25, 2009 at 08:22:38AM -0800, Larry McVoy wrote:
> 
> Dudes, sync() doesn't flush the fs cache, you have to unmount for that.
> Once upon a time Linux had an ioctl() to flush the fs buffers, I used
> it in lmbench.  
> 
>       ioctl(fd, BLKFLSBUF, 0);
> 
> No idea if that is still supported, but sync() is a joke for benchmarking.

Depends on what you are trying to do (flush has multiple meanings, so
using can be ambiguous).  BLKFLSBUF will write out any dirty buffers,
*and* empty the buffer cache.  I use it when benchmarking e2fsck
optimization.  It doesn't do anything for the page cache.  If you are
measuring the time to write a file, using fsync() or sync() will
include the time to actually write the data to disk.  It won't empty
caches, though; if you are going to measure read as well as writes,
then you'll probably want to do something like "echo 3 >
/proc/sys/vm/drop-caches".

                                                - Ted

<Prev in Thread] Current Thread [Next in Thread>