[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving /tmp to tmpfs makes it useless

Le 25/05/2012 05:03, Russell Coker a écrit :
> On Fri, 25 May 2012, Serge <sergemdev@gmail.com> wrote:
>> Q: /tmp on tmpfs increases apps performance.
>> A: What apps? Real apps don't write files during performance-critical
>>    operations. Even if they do, they write large files. And large files are
>>    written faster when they're written on real disk, rather then swapped
>>    out and slow down the entire system (see the "Who uses /tmp" part).
>>    The apps that can really benefit from tmpfs are too rare. And we're
>>    talking about default settings and most common cases.
> Any application which writes synchronously (through fsync(), fdatasync(), or 
> opening with O_SYNC) will get a massive performance benefit from using tmpfs.

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?


Reply to: