Our first effort of the optimization is to reduce the amount of metadata committed to a file system which is caused by fsync() call in SQLite. The fsync() operation flushes both the metadata and data
to storage. We found that fdatasync() operation is a good alternative to fsync() because it does not
flush metadata unless it is required to allow a subsequent data retrieval to be correctly treated. In Android platform, the filesystem is mounted with no-atime option, and SQLite states that it only cares the files size, not the other attributes. Guaranteed that the underlying OS and file system support fdatasync() correctly, the use of fdatasync() does not affect the file system integrity.
No comments:
Post a Comment