When to flush()?
When to flush()?
Posted Apr 1, 2009 12:20 UTC (Wed) by RobSeace (subscriber, #4435)In reply to: When to flush()? by rvfh
Parent article: That massive filesystem thread
Posted Apr 1, 2009 13:19 UTC (Wed)
by rvfh (guest, #31018)
[Link] (2 responses)
Yes, but with more granularity. O_SYNC means write everything immediately, whereas you might want to give the kernel some time to organise the reads/writes more efficiently:
Posted Apr 2, 2009 14:14 UTC (Thu)
by xoddam (guest, #2322)
[Link] (1 responses)
Things go strangely pear-shaped when the most irrelevant, trivial data (eg. GNOME configs when we're only using GNOME because it's a default someone else chose) goes missing or gets corrupted.
I most definitely don't care if GNOME forgets where I put a window or two. But I do care if it fails to start.
What we end-users want (I wear a developer hat much of the time but I'm *always* a user) is not to be annoyed by the things we don't care about. O_EXPENDABLE and its ilk are an invitation for corner-cases to bite end-users. End-users don't deserve such treatment.
Posted Apr 2, 2009 14:30 UTC (Thu)
by rvfh (guest, #31018)
[Link]
And anyway, do we really not know which files are important and which are not?
But I do thank you for challenging this idea ;-) Please feel free to give counter-examples and -arguments.
When to flush()?
* O_CRITICAL: 1 second
* O_EXPENDABLE: 30 seconds
* default: 5 seconds
Totally superfluous.
Totally superfluous.
How then are they expected to know when to flush?
Examples:
* pid file, browser cache: don't care
* conf file, document, code: care
* database file: care a lot