Re: Moving /tmp to tmpfs makes it useless
On Fri, 25 May 2012, Jon Dowland wrote:
> On Fri, May 25, 2012 at 09:46:37AM +0200, Vincent Danjean wrote:
> > If some kind of sync is required by the application, I think this is
> > because the application want to ensure the data are really written to
> > the disk so that their state remains coherent even in case of crash.
> > If the application is ok to have this kind of data written to
> > tmpfs (ie in memory), I do not see the interest of using sync at
> > first. Can someone shows me a valid use case of sync on tmpfs?
> I'd agree with your analysis, it's buggy for them to aggressively sync for writes
> to /tmp.
Hmm, no. If the application Does It Right (emacs, vim...) they will
break hardlinks on open, and fsync properly on close/write by default.
That doesn't make them buggy, just because someone decided to tell them
to act on a file hosted in a tmpfs.
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot