Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bad fsync? (A.M.)



Jonas Maebe <email@hidden> wrote:

If you were to use those platforms' functionality (where avaialble) to
force
a full push to disk, you would see similar performance regressions.

Doesn't this behaviour also mean that the "safety" provided by journaling is basically not there? Or does the journaling code use

HFS+ journaling does the same thing as F_FULLFSYNC to
flush all data to disk.  Actually to be correct, it is
F_FULLFSYNC that asks the journal to do the work but the
net effect is the same: we issue a DKIOCSYNCHRONIZECACHE
ioctl on the underlying device and that in turn translates
to the appropriate ATA, SCSI, or Fibre Channel command to
ask the disk to flush its buffers to the media.  And in
case anyone is wondering: if you don't have journaling
enabled then HFS+ just calls DKIOCYSNCHRONIZECACHE directly.
These are implementation details that apps do not need to
worry about.


email@hidden (Jack Howarth) wrote:
Out of curiousity, is there a benchmark I can run that shows this
difference in performance between fsync being on and off?

Just to be clear here: from the OS perspective there is no
notion of fsync being "on" or "off" -- it always behaves
the same way as documented in the man page.  An system like
SQlite may allow you to enable or disable calling fsync but
that's a different thing altogether.  At the OS level fsync
is always "on".



--dominic


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.