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.)




Thanks for a great explanation. A similar thread has come up on the
sqlite list, claiming that using F_FULLFSYNC  leads to dramatic
performance decreases on Darwin over other platforms. Any thoughts on
these issues?

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


I noticed this as well, so I profiled my call and found sync was taking
forever. I removed the following fcntl call, rc = fcntl(fd,
F_FULLFSYNC, 0);. Performance was back to normal.

... but the security provided by F_FULLSYNC is lost.

It's a simple question of performance vs. reliability; in order to give the best
guarantee that data has made it to stable storage, the system has to spend
a (relatively) long time waiting for the disk. If you want performance, that
wait is unacceptable. If you want reliability, the uncertainty that the disk (and
sometimes controller) cache(s) introduce is unacceptable.


At least Darwin gives you the choice; it's up to you to make the tradeoff that
suits your application's needs.


 = Mike

_______________________________________________
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.