Temporary files: RAM or disk?
Posted Jun 4, 2012 15:37 UTC (Mon) by giraffedata
In reply to: Temporary files: RAM or disk?
Parent article: Temporary files: RAM or disk?
Any application that is handling costly-to-replace data should use fsync. An app that is handling cheap data should not. It is really that simple.
Well, it's a little more complex because applications are more complex than just C programs. Sometimes the application is a person sitting at a workstation typing shell commands. The cost of replacing the data is proportional to the amount of data lost. For that application, the rule isn't that the application must use fsync, but that it must use a sync shell command when the cost of replacement has exceeded some threshold. But even that is oversimplified, because it makes sense for the system to do a system-wide sync automatically every 30 seconds or so to save the user that trouble.
On the other hand, we were talking before about temporary files on servers, some of which do adhere to the fsync dogma such that an automatic system-wide sync may be exactly the wrong thing to do.
to post comments)