Jim Lesurf writes:
A question occurs to me prompted by the way the Flack Health Check program
works. (And which I may also use for CD Health Check.)
In operations it relies on writing a tempory file, reading back its
contents, deleting the file, then repeating the process. The 'cycle' takes
somewhat less than a second per tempfile.
This is being written to an ext4 formatted SSD, but could, of course be to
other format/types of storage depending on the user's situation.
Given the bufferring which file systems use, do the files all actually get
written onto the SSD/HD? Or do they go to some kind of ram buffer and are
then deleted again before being actually written to the main part of the
SSD or HD?
(Depending on mount options) they’ll be buffered at least initially.
Whether the buffer gets flushed while the file is live would be
dependent on timing; I’m not sure if it’ll attempt to flush blocks
corresponding to deleted files if it didn’t flush them when live (you’d
hope not, though).
I’m more confident that there’ll be real writes corresponding to changes
the containing directory.
If your goal is to avoid physical writes if possible, then a tmpfs is a
good bet.
--
http://www.greenend.org.uk/rjk/