Write cache, is write cache, is write cache?

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jan 24 12:54:09 UTC 2011


On Sat, Jan 22, 2011 at 05:27:14PM +0000, Bruce Cran wrote:
> On Sat, 22 Jan 2011 15:51:21 +0000
> Karl Pielorz <kpielorz_lst at tdx.co.uk> wrote:
> 
> > I'll have a look at those - I'm more interested in finding a tool
> > that will write data both with, and without the "don't cache this"
> > flag(s) set - to see if the performance is the same (you would hope
> > that regardless of the BIOS setting that writing entirely data that's
> > marked not to be cached, the performance would 'sink' back down to a
> > sedate 12Mbytes/sec) - if it doesn't, something is lying somewhere :)
> 
> sysutils/fio supports that: just add "fsync=x" to the
> configuration file and it'll send a request to the OS to flush the data
> to disk every x blocks.

My guess (based on option name) is that it will perform fsync(2) every x
blocks, which has nothing to do with disk write cache. Most file systems
(unfortunately UFS is one of them) simply ignores existance of disk
write caches. In Mac OS X you can find F_FULLFSYNC flag to fcntl(2)
which is suppose to ask underlying disk to flush its cache. fsync(2)
don't do that for UFS, but it does that for ZFS.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110124/4cf2d656/attachment.pgp


More information about the freebsd-fs mailing list