Places:FsyncApproach

From MozillaWiki
Revision as of 16:12, 25 June 2008 by Dietrich (talk | contribs) (New page: =Problem= {{bug|421482}} =Partitioning Approach= Summary from Dr. Hipp: <blockquote>Presumably you have some large tables in your main database file that you consult frequently and upda...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Problem

bug 421482

Partitioning Approach

Summary from Dr. Hipp:

Presumably you have some large tables in your main database file that you consult frequently and update occasionally. I'm suggesting splitting each table in two. The long-term persistent data is stored in the persistent database. Recent changes are stored in a separate TEMP tables. As I pointed out earlier, TEMP tables do not use fsync. So you can write to temp tables as much as you want without getting into fsync problems. But if you put your changes in TEMP tables, that means whenever you query the database, you have to do a more complex query that pulls in information from the main table and also overlays any changes or additions from TEMP tables. [sic] Then you have a separate thread that every minute or so transfers all of the accumulated information in the TEMP tables over to the main persistent database as a single transaction. That gives you a total of 2 or 3 fsyncs per minute, which even the most broken file system should be able to handle with ease.

Mitigation